What is the best way to restrict product detail page开发者_高级运维 for logged in user?
add the login check to controller, or if you must then to the view with the following condition
$this->helper('customer')->isLoggedIn();
Thanks guyes for your reply. I found one more option to do that by adding your restricted referance < remove name="wishlist_sidebar" >< /remove >
in this tag < customer_logged_out > at customer.xml.
now if customer is logged out he will not see the wishlist_sidbar block.
What you say about this approch.
<?php
if(Mage::getSingleton('customer/session')->isLoggedIn()){
echo "loggein user";
else{
echo "no loggein user";
}
?>
精彩评论