Jump to content

HOT : Display "reduction(percent)" in Product-list.tpl and "reduction to" in product.tpl ( Prestashop 1.4 )


PrestaSOO

Recommended Posts

Hi every one!
I'm new in prestashop, so i hope you will help me!
1. I wanna display Product Price reduction ( percent ) in product-list.tpl. But when i use

{$product.reduction}

, it was reduction in amount. What must i do now ?
Note : In Prestashop 1.3, i used

{$product.reduction_percent|floatval}

and it's ok.
+++
2. I wanna display Product Price reduction to in product.tpl ( etc : 2011-11-09 ), but i don't know how to do that.
Note : In Prestashop 1.3, i used

{$product->reduction_to}

and it's ok.
Please, help me

Link to comment
Share on other sites

  • 2 weeks later...

Same issue for me.

assigned template variables are different in PS 1.4

We have $products / specific_prices / reduction
it means, 2 arrays.
I tried to call $products.specific_prices.reduction , unsuccessfully.

I hope a SMARTY expert can help us :)

Link to comment
Share on other sites

  • 2 weeks later...

Hi,

After searching we found that you may show price reduction with amount and with percentage with below codes:

Reduction with Percentage:

{if $product.specific_prices.reduction_type == 'percentage'}
       {$product.specific_prices.reduction*100} %
{/if} 



Reduction with Amount:

{if  $product.specific_prices.reduction_type == 'amount'}   
       {$product.specific_prices.reduction|string_format:"%.2f"}
{/if}

  • Like 5
Link to comment
Share on other sites

  • 2 months later...
  • 2 months later...
  • 3 months later...
  • 1 year later...
  • 1 year later...

Hi,

 

After searching we found that you may show price reduction with amount and with percentage with below codes:

 

Reduction with Percentage:

{if $product.specific_prices.reduction_type == 'percentage'}        {$product.specific_prices.reduction*100} %{/if}

Reduction with Amount:

{if  $product.specific_prices.reduction_type == 'amount'}           {$product.specific_prices.reduction|string_format:"%.2f"}{/if}

 

$product.specific_prices!

Life saver! Many thanks !

  • Like 1
Link to comment
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...