ospnz Posted April 15, 2013 Share Posted April 15, 2013 Hi guys, This could be a very simple to do job but somehow I could not find where to edit it. I needed to change the discount (-) sign to (save), for example: the discounted of $50 off on specials and current Prestashop shown as (-$50.00) but I wanted to change it to (Save $50.00) instead. Please help, thank you very much in advance. Regards Jacky Link to comment Share on other sites More sharing options...
NemoPS Posted April 15, 2013 Share Posted April 15, 2013 As far as I know that's hardcoded in the TPL files. Depending on where you want it to display like that, you'll have to edit the corresponding tpl. For example, for the product page you'll need to change product.tpl, at about line 407 (1.5.4) {if $product->specificPrice AND $product->specificPrice.reduction_type == 'amount' AND $product->specificPrice.reduction|intval !=0} -{convertPrice price=$productPriceWithoutReduction-$productPrice|floatval} {/if} Link to comment Share on other sites More sharing options...
ospnz Posted April 15, 2013 Author Share Posted April 15, 2013 As far as I know that's hardcoded in the TPL files. Depending on where you want it to display like that, you'll have to edit the corresponding tpl. For example, for the product page you'll need to change product.tpl, at about line 407 (1.5.4) {if $product->specificPrice AND $product->specificPrice.reduction_type == 'amount' AND $product->specificPrice.reduction|intval !=0} -{convertPrice price=$productPriceWithoutReduction-$productPrice|floatval} {/if} Hi Nemo1 Thanks for that and unfortunately I don't know much about php coding, will you be more specify which code to change? I just want to replace the minus (-) sign to (save) in the product details page. Regards Jacky Link to comment Share on other sites More sharing options...
ospnz Posted April 17, 2013 Author Share Posted April 17, 2013 Hi Nemo1, I have tried to change the codes of your last post but without luck, would you kindly give some codes that need to replace? Thanks Jacky Link to comment Share on other sites More sharing options...
ospnz Posted April 17, 2013 Author Share Posted April 17, 2013 Hi everyone, I'm still needs help on this topic, please help. Regards Jacky Link to comment Share on other sites More sharing options...
NemoPS Posted April 17, 2013 Share Posted April 17, 2013 Which PS version are you using? If you use a custom theme, it's impossible for us to determine at which line you must change the minus sign Otherwise let us know Link to comment Share on other sites More sharing options...
ospnz Posted April 17, 2013 Author Share Posted April 17, 2013 Which PS version are you using? If you use a custom theme, it's impossible for us to determine at which line you must change the minus sign Otherwise let us know Hi Nemo1, Thanks for your respond. I'm using PS 1.5.3. default theme and only changing the theme colour so there's not much changes on code beside adding code for random products on homefeature. Regards Jacky Link to comment Share on other sites More sharing options...
NemoPS Posted April 17, 2013 Share Posted April 17, 2013 Line 400 and next one, the code follows here: <p id="reduction_percent" {if !$product->specificPrice OR $product->specificPrice.reduction_type != 'percentage'} style="display:none;"{/if}><span id="reduction_percent_display">{if $product->specificPrice AND $product->specificPrice.reduction_type == 'percentage'}-{$product->specificPrice.reduction*100}%{/if}</span></p> <p id="reduction_amount" {if !$product->specificPrice OR $product->specificPrice.reduction_type != 'amount' && $product->specificPrice.reduction|intval ==0} style="display:none"{/if}><span id="reduction_amount_display">{if $product->specificPrice AND $product->specificPrice.reduction_type == 'amount' && $product->specificPrice.reduction|intval !=0}-{convertPrice price=$product->specificPrice.reduction|floatval}{/if}</span></p> Pretty messy, but try to find the minus signs and replace those Link to comment Share on other sites More sharing options...
ospnz Posted April 18, 2013 Author Share Posted April 18, 2013 Line 400 and next one, the code follows here: <p id="reduction_percent" {if !$product->specificPrice OR $product->specificPrice.reduction_type != 'percentage'} style="display:none;"{/if}><span id="reduction_percent_display">{if $product->specificPrice AND $product->specificPrice.reduction_type == 'percentage'}-{$product->specificPrice.reduction*100}%{/if}</span></p> <p id="reduction_amount" {if !$product->specificPrice OR $product->specificPrice.reduction_type != 'amount' && $product->specificPrice.reduction|intval ==0} style="display:none"{/if}><span id="reduction_amount_display">{if $product->specificPrice AND $product->specificPrice.reduction_type == 'amount' && $product->specificPrice.reduction|intval !=0}-{convertPrice price=$product->specificPrice.reduction|floatval}{/if}</span></p> Pretty messy, but try to find the minus signs and replace those Hi Nemo1, You're the best and thank you so much for your helps, I am highly appreciated indeed. Mod, please add [solved] to the header of this topic on my behalf, thank you. Regards Jacky Link to comment Share on other sites More sharing options...
Recommended Posts