Magento show money saved as a Percentage
Go to the following location: app/design/frontend/yourtheme/yourtheme/template/catalog/product/view/
Download and back-up the this file “price.phtml”.
Open file and look for: (Around line 318 (for me) )
<?php else: // excl. ?>
<p class="old-price">
<span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
<span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
<?php echo $_coreHelper->currency($_regularPrice,true,false) ?>
</span>
</p>
After this add
<?php
// Display Percentage Saved here
$totalPercent = (($_regularPrice / $_finalPrice) *100) - 100;
echo "<div class='savings'>";
echo "(save ".round($totalPercent)."%)";
echo "</div>";
?>
Written by David Allsop
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Magento
Authors
Related Tags
#magento
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#