开发者

Restrict user to view product in magento

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";
   }
?> 
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜