I need a way that products should be visible for only logged in customers Someone said me that I should use catalog_product_collection_load_before Event How can I use it?
1 Answer
To achieve this functionality you can use some free extension ( you will find some on google ) or you can implement a check on your catalog listing page :
Extension :
https://github.com/jreinke/magento-require-login
if you want to apply custom code you can apply below code in following file ( top ):
1) app\design\frontend\rwd\default\template\catalog\product\list.phtml
2) app\design\frontend\rwd\default\template\catalog\product\view.phtml
Code :
<?php
if(!Mage::getSingleton('customer/session')->isLoggedIn()){
Mage::app()->getFrontController()->getResponse()->setRedirect(Mage::getUrl('customer/account/login'));
}
?>