I am planning to allow the guest user to be able to view the product catalog. But I would like them not to see the prices. Is there a way to do that?


1 Answer 1


You have a few options:

Do it yourself


insert at the very beggining of the file:

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

insert at the very end of the file

<?php } ?>

hiding add to cart:


<?php if($_product->isSaleable()): ?>
                    <button class="form-button" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><?php echo $this->__('Add to Cart') ?></span></button>
                <?php else: ?>
                <div class="out-of-stock"><?php echo $this->__('Out of stock') ?></div>
                <?php endif; ?>

before that code insert:

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

after that code insert:

<?php } ?>

you will find two times in the file..(one for the list mode one for grid mode!)


<div class="add-to-holder">
                    <?php if($_product->isSaleable()): ?>
                        <?php echo $this->getChildHtml('addtocart') ?>
                        <?php if( $this->helper('wishlist')->isAllow() || $_compareUrl=$this->helper('catalog/product_compare')->getAddUrl($_product)): ?>
                            <span class="add-or"><?php // echo $this->__('OR') ?></span>
                        <?php endif; ?>
                    <?php endif; ?>
                    <?php echo $this->getChildHtml('addto') ?>

before that code insert:

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

after that code insert:

<?php } ?>

if you have tier prices etc.. you have to use the same trick in the other files. u can find them in one of this files in the folder:


Source: http://www.magentocommerce.com/boards/viewthread/22673/

Install a module

There are several available:

A free B2B plugin on Github that lists hiding prices for guests among its features:


Or, one you can buy:


Finally, one that is even more expensive:


Source: https://stackoverflow.com/questions/6299366/hide-prices-and-disable-checkout-for-guests

Not the answer you're looking for? Browse other questions tagged or ask your own question.