modules/phyto_collection_widget/
Direct path in the repo โ all PHP, SQL, templates, and assets
Overview
Automatically builds each customer a personal “My Collection” page populated from their order history. Each plant in the collection can be toggled public or private, and customers can add personal care notes to each one. A shareable link lets them show off their collection without exposing account details.
Features
- Auto-populated from order history โ no manual entry needed
- Per-plant public/private toggle
- Personal care notes field per plant
- Shareable public collection URL (token-based, account details hidden)
- Beautiful plant card grid layout with product image and name
Hooks Registered
| Hook | Purpose |
|---|---|
displayCustomerAccount | “My Plant Collection” link in account |
actionOrderStatusUpdate | Adds purchased plants to collection on order confirmation |
Source Layout
| Path | Purpose |
|---|---|
phyto_collection_widget.php | Module entry + hooks |
classes/PhytoCollectionItem.php | ORM for collection entries |
controllers/front/collection.php | Customer collection page |
controllers/front/share.php | Public shareable collection view |
sql/install.sql | Creates collection items table |