Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Smart category
 
Bas van Rijn
Jr. Member
 
Total Posts:  21
Joined:  2009-10-16
 

Hi There,
Is it possible to do the following? I want to put products with certain attribute values into a category. For example, I’d like to put all blue products into a category. And that the folder updates automatically.

Just like how smart folders work on a Mac (don’t know what’s the Windows equivalent).

Kind regards,
B

 
Magento Community Magento Community
Magento Community
Magento Community
 
DavidAlger
Jr. Member
 
Avatar
Total Posts:  29
Joined:  2009-03-17
 

Put an observer on both the category and product save events so when an administrator saves either of them you can process your rules and remove the product from, add it to the category, etc, etc. I’d suggest using a custom attribute on the category to indicate that it’s a smart category so you can quickly identify whether or not you need to process rules or not, this will also enable you do load a collection of smart categories pretty easily. One thing to note, make sure you write the processing code in the observer in a fairly efficient manner so whomever is taking care of product entry doesn’t hate you for drastically slowing things down. wink

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top