one way to control special groups of products in zencart
I recently had a request to replace display of hotsellers, featured, etc products with something more customizable. What we ended up doing was the following:
- Create a new category in zencart admin and disable (ignore the warning about products being removed – its a new category so there can’t be products)
- link products wanted into the new category
- In the template, load products with ZMProducts::instance()->getProductsForCatetgoryId(). The category id needs to be hardcoded here, so if you are using the templates across several installations (for example a QA site!) you might want to configure the actual categoryIds as settings…
- Manage the products displayed by linking/removing products in a special category
Comments Off
