How can I show featured products from a certain category only?
I managed to create 'featured product' as one of the attributes for my products and I have 'tagged' a few products to this attribute. But my problem is I only want to show the featured product from one particular category only.
I have 'wine', 'food', 'gifts', etc as my categories. And each category has their own featured products, so when I am on wine category view page, I want to show the featured ones from wine category only, and then I want to show the ones from food category only when I am on food category view page.
I followed the guides here to create 'featured product' attribute,
Best Answer
Source: https://stackoverflow.com/a/12288000/158325
Found a working solution using Alan Storm's advice.
/template/custom/featured-product.phtml
In short, the collection is manually generated rather than receiving a collection (as my initial attempt did):
Using in a CMS Page:
Using in a template:
/layout/local.xml
/template/page/html/footer.phtml
Helpful resources:
How to get a product collection:
Using magic getters/setters: