modules/phyto_bundle_builder/
Direct path in the repo โ all PHP, SQL, templates, and assets
Overview
Lets customers build their own plant bundles from slot-based templates you define. They pick products to fill each slot, get a combined bundle discount, and add the whole bundle to cart in one click. You manage bundle templates and discounts from admin.
How It Works
- Admin creates a bundle template: name, number of slots, eligible product categories per slot, and discount %
- Customer visits the bundle builder page, selects a template
- AJAX product picker lets them search and choose a product for each slot
- Bundle summary shows total price with discount applied
- “Add Bundle to Cart” adds all selected products with the combined discount as a cart rule
Features
- Slot-based templates (e.g. “3-plant starter bundle: 1 Nepenthes + 1 Heliamphora + 1 Sarracenia”)
- AJAX product search per slot (filters by eligible categories)
- Combined bundle discount applied as a cart rule (not a fake price reduction)
- Bundle compositions saved to DB โ admin can see what bundles customers built
- Mobile-responsive bundle builder UI
Source Layout
| Path | Purpose |
|---|---|
phyto_bundle_builder.php | Module entry + menu registration |
classes/PhytoBundle.php | ORM for bundle templates |
classes/PhytoBundleSlot.php | ORM for slot definitions |
controllers/front/builder.php | Bundle builder page |
controllers/front/products.php | AJAX product search endpoint |
controllers/admin/AdminPhytoBundleBuilderController.php | Bundle template management |
views/templates/front/builder.tpl | Bundle builder UI |
views/js/front.js | AJAX slot interaction + cart add |