Jump to content

Show amount saved instead of percentage


Recommended Posts

On my product.tpl page at the moment it shows "you save 20%" but I would like it to show the amount saved like "You save £20.00"

Im using version and the code at the moment is:

{if $product->reduction_percent != 0 && ($product->reduction_from == $product->reduction_to OR ($smarty.now|date_format:'%Y-%m-%d' <= $product->reduction_to && $smarty.now|date_format:'%Y-%m-%d' >= $product->reduction_from))}

{l s='(You Save'} {$product->reduction_percent|floatval}%{l s=')'}

Any help would be appreciated,


Share this post

Link to post
Share on other sites

  • 3 weeks later...

just replace following line
in product.tpl

{l s='(price reduced by'} {$product->specificPrice.reduction*100} %{l s=')'}

{l s='(You save'} {convertPrice price=$productPriceWithoutRedution-$productPrice} %{l s=')'}
at product.tpl

tested in prestashop 1.4+

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More