PrestaSOO Posted March 23, 2011 Share Posted March 23, 2011 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 More sharing options...
Julien81 Posted April 1, 2011 Share Posted April 1, 2011 Same issue for me.assigned template variables are different in PS 1.4We have $products / specific_prices / reductionit 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 More sharing options...
Pshopic Posted April 11, 2011 Share Posted April 11, 2011 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} 5 Link to comment Share on other sites More sharing options...
cammo Posted June 20, 2011 Share Posted June 20, 2011 Thanks Prestashopic..Just what I was after. Link to comment Share on other sites More sharing options...
marecekloool Posted August 29, 2011 Share Posted August 29, 2011 thank you soo much prestashopic. you helped a lot of people including me Link to comment Share on other sites More sharing options...
yesiam Posted December 18, 2011 Share Posted December 18, 2011 Thank you ! Link to comment Share on other sites More sharing options...
perusi Posted July 26, 2013 Share Posted July 26, 2013 for prestashop 1.5? Link to comment Share on other sites More sharing options...
PrestaShark Posted September 19, 2014 Share Posted September 19, 2014 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 ! 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now