Magento Forum

Product status=1, addAttributeToFilter(’status’, array(’eq’=>’1’)) does not return product
 
bcelenza
Member
 
Avatar
Total Posts:  44
Joined:  2008-08-27
 

Good afternoon all,

I’m having an issue where a product is marked as Enabled (status=’1’), but when I attempt to fetch it from a collection with a filter of addAttributeToFilter(’status’, array(’eq’=>’1’)), it is not returned.

If I change this filter to ‘eq’=>’2’ (disabled), it returns the product.

What could cause this issue? Is it potentially a MySQL or PHP caching issue? Has anyone else run into something similar?

Thanks in advance!

 
Magento Community Magento Community
Magento Community
Magento Community
 
bcelenza
Member
 
Avatar
Total Posts:  44
Joined:  2008-08-27
 

Solved my own problem! Had to do with store IDs not being correct. Thanks anyway!

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