Jump to content

[Solved] homefeatured.tpl show discount


Recommended Posts

  • 1 month later...

Noone helped so searched a LOT and through trial and error got this working:

 

Add to homefeatured.tpl

 

{if ((isset($product.reduction) && $product.reduction)) && $product.price_without_reduction > $product.price && $product.show_price AND !isset($restricted_country_mode) && !$PS_CATALOG_MODE}

{math assign="reduction_amount" equation="(x - y)" x=$product.price_without_reduction y=$product.price}

{math assign="reduction_perc" equation="(x / y) * 100" x=$reduction_amount y=$product.price_without_reduction format="%.0f"}

 

<p class="price_container"><span class="price">

{convertPrice price=$product.price_tax_exc} (-{$reduction_perc}%)

</span></p>{else}<div style="height:0px;"></div>{/if}

 

 

Hope it helps someone! Same can be added to products-list.tpl in theme folder too!

Link to comment
Share on other sites

  • 4 months later...

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...