The amount reduced will be shown in percentage in above link.

I need to display percentage of discount along with "HOW MUCH PRICE SAVED

IN NUMBER", as like this :

You Save: 5,810.00 (18%)


what changes I have to do for this.

please help me to find solution.

thanks in advance

1 Answer 1


goto app/design/frontend/base/default/template/catalog/product/ and copy price.phtmlto app/design/frontend/Your_theme/default/template/catalog/product/ now in price.phtml find for this code

<?php endif; /* if ($_finalPrice == $_price): */ ?>

above this code add following code

<?php if($_finalPrice < $_price): ?>
    $_savePercent = 100 - round(($_finalPrice / $_price) * 100); 
    $_saveAmount = number_format(($_price - $_finalPrice), 2);  
        <p class="yousave">
            <span class="price-label label">You Save: </span>
            <span class="price">
                <strong class="save-amount">$<?php echo $_saveAmount; ?></strong> (<?php echo $_savePercent; ?>%)
    <?php endif; ?>
  • for this line : <strong class="save-amount">$<?php echo $_saveAmount; ?></strong> (<?php echo $_savePercent; ?>%) , I want to use only one echo statement with smae output. please edit the code and paste here.... thanks a lot in advance.... Jan 7, 2015 at 4:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.