Hire a web Developer and Designer to upgrade and boost your online presence with cutting edge Technologies

Tuesday, January 8, 2013

Removing Top or Bottom Price on Magento Product Page

If you set up configurable products in Magento, you will notice that the product page now has the price listed twice: once at the top of the product page and a second time below the configurable product options. This post details how to remove the top and / or the bottom price display.
To remove the top price display:
1) Open /app/design/frontend/default/THEME/template/catalog/product/view/type/configurable.phtml.
2) At the bottom of the file, add the following code:
<script>
$$('div.product-shop .price-box').invoke('setStyle', { display: 'none' });
</script>
This is a bit of a hack and is not the most elegant solution, but most importantly it works. It removes the top price and not the bottom price. It only does this for configurable products.
To remove the bottom price display:
1) Open app/design/frontend/default/THEME/template/catalog/product/view/price_clone.phtml .
2) Comment out the below code:
<?php echo $this->getPriceHtml($_product, false, '_clone') ?>
Voila!

1 comment: