modules/phyto_care_card/
Direct path in the repo โ all PHP, SQL, templates, and assets
Overview
Generates a printable PDF care card for each product covering everything a buyer needs to know: light requirements, watering frequency, humidity, temperature range, potting media, dormancy notes, and more. Automatically attached to the order confirmation email.
Care Card Fields
- Light requirements (Full sun / Partial shade / Low light)
- Watering frequency and method
- Humidity range (%)
- Temperature min/max (ยฐC)
- Potting media recipe
- Fertilisation schedule
- Dormancy / seasonal notes
- Special care tips (free text)
Hooks Registered
| Hook | Purpose |
|---|---|
actionOrderStatusUpdate | Attaches PDF to order confirmation email |
displayProductAdditionalInfo | “Download Care Card” button on product page |
displayAdminProductsExtra | Admin care card data entry form |
displayPDFInvoice | Optional inclusion on invoice |
Source Layout
| Path | Purpose |
|---|---|
phyto_care_card.php | Module entry + hooks |
classes/PhytoCareCardGenerator.php | TCPDF wrapper โ builds the PDF |
classes/PhytoCareCardData.php | ORM model for care fields |
controllers/front/download.php | Public PDF download endpoint |
controllers/admin/AdminPhytoCareCardController.php | Admin data entry |
sql/install.sql | Creates phyto_care_card_data table |