2

I want to create a new category page which shows all products which have a certain product attribute (speed_delivery) set to yes.

I was thinking about to create an empty category, catch its product collection via observer and modify it (filtering by the attribute)

Unfortunately this approach doesn't seem to work because it looks like there is no event to hook into the category product collection (https://www.nicksays.co.uk/magento-events-cheat-sheet-1-9/)

How would you solve it? Do I have to rewrite Mage_Catalog_Model_Category::getProductCollection(). I can't think of a better approach at the moment.

Thank you.

0

I guess you should use the catalog_block_product_list_collection event.

This event is dispatched in app/code/core/Mage/Catalog/Block/Product/List.php::_beforeToHtml and let you modify the product collection.

  • I tried this solution but it didn't work. It turned out it was a custom overwrite..so your answer is correct. – Xavin Oct 31 '18 at 6:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.