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.
Most of us are facing a common problem, that Magento does not have facility to show Discount which comes from
Discount =Price-Special Price
this is very weird such a simple thing is missing , Never mind they give you lot more.
So lets See how it is possible to Show You Save :50% Box
Things you will need to do
- 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
/public_html/app/design/frontend/themename
Here themename is the theme you are using , default theme comes with default folder
Now locate view.phtml file
Open it and
Find
<?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% ?>
Now you can show the Discount any where by Echo $finalpercentage;
ie
<?php echo "You Save :". $finalpercentage."%";?>
You save Box in Magento Product Page