Home โ€บ Modules โ€บ phyto_climate_zone

phyto_climate_zone

Customer enters their PIN code and sees which plants suit their Indian climate zone โ€” 15 PCC-IN zones, 797 PIN prefixes, monthly climate chart, fully offline.

Plant Science v2.0 PrestaShop 8 Browse Source on GitHub โ†—
modules/phyto_climate_zone/
Direct path in the repo โ†’ all PHP, SQL, templates, and assets
Open on GitHub โ†—

Overview

Buyer enters their city or PIN code; the module shows which plants are suitable for their climate (outdoor vs indoor-only). Fully offline โ€” no external API calls. Covers all major Indian climate types from humid tropical Kerala to Rajasthan desert to Himalayan alpine.

Version History

v1.0 โ€” First Build

5 hardcoded climate zones, 26 PIN prefixes, basic “Suitable / Not Recommended” result. Proof-of-concept only.

v2.0 โ€” 15 PCC-IN Zones, 797 PIN Prefixes, Monthly Climate Chart (current)

Complete data-driven rewrite:

  • 797 Indian 3-digit PIN prefixes mapped to 15 climate zones
  • 15 PCC-IN climate zones โ€” from IN-KL-TH (Kerala humid tropical) to IN-RJ-HD (Rajasthan hot desert) to IN-HP-AL (Himalayan alpine)
  • Monthly climate chart โ€” temperature + humidity bar chart, frost risk flags, monsoon month markers
  • Zone detail panel โ€” example cities, outdoor/indoor suitability verdict, specific plant warnings
  • Entire dataset ships as two JSON files โ€” zero HTTP calls at runtime

Source Layout

PathPurpose
phyto_climate_zone.phpModule entry + hooks
data/pin_to_zone.json797 PIN prefix โ†’ zone mappings
data/zone_climate.jsonMonthly climate data per zone
views/js/climate_widget.jsPIN lookup + chart rendering (Chart.js)
views/templates/hook/widget.tplProduct page climate widget
View Full Source โ†— โ† Back to All Modules