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, 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

Magento Forum

Product Visibility Attribute implementation
Jr. Member
Total Posts:  2
Joined:  2008-11-20


I created new Attribute named product_visibility_type. For each product you can set its value to either A or B.
It should control product visibility in catalog. If it’s set to A, i want the product to be normally shown, but if it is B the product should only be shown if it’s available in stock (qty > 0).

I tought, it would be a good idea to put all code changes into a module, to be able to upgrade magento when needed.
So I created my module, set its etc/config.xml to handle “catalog_product_collection_load_after” event with “my_function($observer)”.
This works, and my function gets executed, but I have no idea how to get to any attributes i need to check with $observer variable.
I am also not sure if this event is appropriate for my needs.

Can anyone describe what should I do or point me into right direction.

Any help appreciated.

Thanks a lot,

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