February 1, 2010

one way to control special groups of products in zencart

Filed under: ZenMagick — DerManoMann @ 2:12 am

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:

  1. 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)
  2. link products wanted into the new category
  3. 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…
  4. Manage the products displayed by linking/removing products in a special category

No Comments

No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.