marcellinho Posted March 26, 2011 Share Posted March 26, 2011 I can´t get this thing working on prestashop 1.4.0.17. Before everything worked fine. Is there anybody, who can help me with this? {if $product.reduction_percent != 0} -{$product.reduction_percent}%{/if} {if $product.reduction_price != 0} -{$product.reduction_price}{$currency->sign}{/if} Thanks Link to comment Share on other sites More sharing options...
Dutohlávek Posted April 16, 2011 Share Posted April 16, 2011 Try this, it works fine for me.I try to get both reductions and here is the code: {if isset($product.reduction) && $product.reduction} {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"} -{convertPrice price=$reduction_amount} (-{$reduction_perc} %) {/if} I hope it helps 1 Link to comment Share on other sites More sharing options...
lydiamunoz Posted August 10, 2011 Share Posted August 10, 2011 Try this, it works fine for me.<br/>I try to get both reductions and here is the code:<br/> <br/>{if isset($product.reduction) && $product.reduction} <br/> {math assign="reduction_amount" equation="(x - y)" x=$product.price_without_reduction y=$product.price} <br/> {math assign="reduction_perc" equation="(x / y) * 100" x=$reduction_amount y=$product.price_without_reduction format="%.0f"}<br/> <br/> -{convertPrice price=$reduction_amount} (-{$reduction_perc} %) <br/>{/if}<br/> <br/>I hope it helps My code in order-details is: {if ($product.reduction_price != 0 || $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))} {assign var='special' value='1'} {else} {assign var='special' value='0'} {/if} {if !$priceDisplay || $priceDisplay == 2} {if $special} {if $product.reduction_price != 0} 1/{convertPrice price=$product.product_price + $product.reduction_price} {elseif $product.reduction_percent != 0} {math assign='product_price' equation='p * (1 - (r / 100))' p=$product.product_price r=$product.reduction_percent} 2/{convertPrice price=$product_price} {/if} {/if} {/if} But {if $product.reduction_price != 0} doesn't work! I have spent hours but i can't see how to do it! {elseif $product.reduction_percent != 0} works perfectly, but not when it is a reduction. I have tried your code but it isn't work in my PrestaShop™ 1.4.0.10. Do you have any idea? Link to comment Share on other sites More sharing options...
klemen130 Posted June 12, 2013 Share Posted June 12, 2013 How to show before- discount price and discount price in featured products- using lof featured product. I have enable Price without Reduction but it snows only one price. Any help? Link to comment Share on other sites More sharing options...
Recommended Posts