开发者

Restrict user to view product in magento

开发者 https://www.devze.com 2023-01-28 10:29 出处:网络
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

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

精彩评论

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