jcadima
10/29/2015 - 1:50 PM

Hide Price for not logged in Users

Hide Price for not logged in Users

REF: http://magentoexpertforum.com/showthread.php/10064-How-to-hide-price-for-not-login-user-in-magento


<?php if(Mage::getSingleton('customer/session')->isLoggedIn()): ?>

just above (line 26) 

<?php if (!$_product->isGrouped()): ?>

and close it at the end of the file 

<?php endif; /* if ($this->isCustomerLoggedIn()): */ ?>




REF: https://chetansanghani.wordpress.com/2014/01/30/hide-product-price-if-magento-user-is-not-logged-in/
======================== Option – 1  ========================

magento\app\design\frontend\default\<your theme>\template\catalog\product\price.phtml

<?php if(Mage::getSingleton('customer/session')->isLoggedIn()): ?>

just above (line 26)

<?php if (!$_product->isGrouped()): ?>

and close it at the end of the file

<?php endif; ?>


========================   Option – 2  ========================

Add some code in your themes head.phtml such as:
magento\app\design\frontend\default\template\page\html\head.phtml

<?php $loggedIn = Mage::getSingleton('customer/session')->isLoggedIn(); ?>