1

I want the price of some products on the site to be displayed only to users who have logged in
To do this, I want to say that if the price of the product was 0 and the user did not loged in, write the following text
Log in to view prices

I use the following code which only checks the login and displays the text for all users

if(!Mage::getSingleton('customer/session')->isLoggedIn()){
echo '<span class="login_for_price"><strong>Login to See Price</strong></span><br>';
return;
}
?>```

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.