The Magento eCommerce platform serves more than 110,000 merchants worldwide and is supported by a global ecosystem of solution partners and third-party developers. Magento is a feature-rich, open-source, enterprise-class platform that offers merchants a high degree of flexibility and control over the user experience, catalog, content and functionality of their online store.
- Backup your file before editing , this is the most important thing to do.
- This is mod is tested on Magento 1.7.x
- Edit only required template file
- Do not alter other code if you do not understand what is it, Quite and Hire a profession Freelancer to do it for you. (may charge $20-$40)
Now Open your FTP or Cpanel and Locate this Folder
Here themename is the theme you are using , default theme comes with default folder
Now locate view.phtml file
Open it and
<?php $_helper = $this->helper('catalog/output'); ?> <?php $_product = $this->getProduct(); ?>
add following code below it
<?php //Mod for Discount% $_finalPrice = $this->helper('tax')->getPrice($_product, $_product->getFinalPrice()); $_regularPrice = $this->helper('tax')->getPrice($_product, $_product->getPrice()); if ($_regularPrice != $_finalPrice): $getpercentage = number_format($_finalPrice / $_regularPrice * 100, 2); $finalpercentage = number_format((100 - $getpercentage),0); endif; //mod for discount% ?>
<?php echo "You Save :". $finalpercentage."%";?>