price display

Add "You Save" amount and percentage to Special Price in Magento

In order to display a "You Save" for "Special Price" products in magento--to make it look similar to amazon's price display--you can do the following:

Copy

app/design/frontend/base/default/template/catalog/product/price.phtml

to

app/design/frontend/default/YOURTEMPLATE/template/catalog/product/price.phtml

Then in price.phtml that you just copied, right above:


Insert:



$_savePercent = 100 - round(($_finalPrice / $_price) * 100);
$_saveAmount = number_format(($_price - $_finalPrice), 2);
?>
Tags: magento price display