Reputation: 109
What is the best way to restrict product detail page for logged in user?
Upvotes: 2
Views: 705
Reputation: 133
<?php
if(Mage::getSingleton('customer/session')->isLoggedIn()){
echo "loggein user";
else{
echo "no loggein user";
}
?>
Upvotes: 0
Reputation: 109
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.
Upvotes: 0
Reputation: 12750
add the login check to controller, or if you must then to the view with the following condition
$this->helper('customer')->isLoggedIn();
Upvotes: 1