display percentage of discount on product list and product view page in magento1.9.1.1?
In the beside of product cost will display the percentage
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.
Sign up to join this communityIf you wish to show product discount percent next to product price or somewhere on a product page, here’s how you do it.
Open
app/design/frontend/yourpackage/yourtheme/template/catalog/product/price.phtml
Find: (line 397)
<?php endif; /* if ($_finalPrice == $_price): */ ?>
Past above it:
<?php // Discount percents output start ?>
<?php if($_finalPrice < $_price): ?>
<?php $_savePercent = 100 - round(($_finalPrice / $_price)*100); ?>
<p class="special-price yousave">
<span class="label"><?php echo $this->__('You Save:') ?></span>
<span class="price">
<?php echo $_savePercent; ?>%
</span>
</p>
<?php endif; ?>
<?php // Discount percent output end ?>
or try to use
display percentage of discount on product list and product view page in magento
You need to use Catalog Price Rule for product price discount from admin -> Promotions -> Catalog Price Rules interface.