Pages

Wednesday, 11 July 2012

Tip to hide the price of the product if Magento user is not logged in

 To show tiered pricing to logged in visitors only, go to: app/design/frontend/default/default/template/catalog/product/view/tierprices.phtml
 
On this file, add this PHP function

  <?php if(Mage::getSingleton('customer/session')->isLoggedIn()): ?>
 
The above function should be added before the following piece of code 

<?php if (count($_tierPrices) > 0): ?>
 
Then add this code at the end.
 
  <?php endif; ?> 

2 comments:

  1. Please try extension http://bsscommerce.com/advanced-hide-price-for-magento-2.html?utm_source=forum&utm_medium=blog Flexibly hide price for specific customer groups, products and categories.

    ReplyDelete

Note: only a member of this blog may post a comment.