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

Filter some products when not logged in
 
Jose M Moreno
Member
 
Total Posts:  58
Joined:  2008-09-01
 

Hello, I need to filter by some category ids or an attribute when it’s not logged in, and after this for some customers, I test with this en code/core/mage/product/list.php but I think it’s not the right way,

Any help????

Line 95 file list.php ( protected function _getProductCollection() )
with Magento 1.5

if (!$this->helper(’customer’)->isLoggedIn())
{
$this->_productCollection->addAttributeToSelect(’*’);
$this->_productCollection->addAttributeToFilter(’atrformato’, array(’neq’ => 161));
}

Thanks and best regards,

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