alfredopacino Posted February 9, 2014 Share Posted February 9, 2014 hi, how can i show the sale percent (%) and original price in featured product? i see just the final price Link to comment Share on other sites More sharing options...
vekia Posted February 9, 2014 Share Posted February 9, 2014 and what if you will have promotion not in percentages but in amount? Link to comment Share on other sites More sharing options...
alfredopacino Posted February 9, 2014 Author Share Posted February 9, 2014 and what if you will have promotion not in percentages but in amount? uhm usually i use percentages, but the amout should be visible too Link to comment Share on other sites More sharing options...
vekia Posted February 11, 2014 Share Posted February 11, 2014 take a look on this code: {if $product.price_without_reduction neq $product.price} {if $product.specific_prices} <div class="reduction_corner"> {assign var='pro_specific_prices' value=$product.specific_prices} <span class="reduction_corner_text"> {if $pro_specific_prices.reduction_type eq 'percentage' && ($pro_specific_prices.from eq $pro_specific_prices.to OR ($smarty.now|date_format:'%Y-%m-%d %H:%M:%S' <= $pro_specific_prices.to && $smarty.now|date_format:'%Y-%m-%d %H:%M:%S' >= $pro_specific_prices.from))} -{$pro_specific_prices.reduction * 100|floatval}% {/if} </span> <span class="reduction_corner_price_text"> {if $pro_specific_prices.reduction_type neq 'percentage' && ($pro_specific_prices.from eq $pro_specific_prices.to OR ($smarty.now|date_format:'%Y-%m-%d %H:%M:%S' <= $pro_specific_prices.to && $smarty.now|date_format:'%Y-%m-%d %H:%M:%S' >= $pro_specific_prices.from))} -{number_format($pro_specific_prices.reduction, 0 , ',' , ' ')},- {* !!!PAs, no decimals and symbol in reduction amount *} {/if} </span> </div> {/if} {/if} it's a code proposed by @PascalVG 1 Link to comment Share on other sites More sharing options...
alfredopacino Posted February 11, 2014 Author Share Posted February 11, 2014 (edited) it totally works! thanks (that should be a backoffice option, the featured products is the most important thing in home page, and for a whole ecommerce) just 1 thing i see the sale amount, but the original price? i tried to simply paste the special module code <span class="price-discount">{if !$priceDisplay}{displayWtPrice p=$special.price_without_reduction}{else}{displayWtPrice p=$priceWithoutReduction_tax_excl}{/if}</span> <span class="price">{if !$priceDisplay}{displayWtPrice p=$special.price}{else}{displayWtPrice p=$special.price_tax_exc}{/if}</span> doesnt work Edited February 11, 2014 by alfredopacino (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted February 11, 2014 Share Posted February 11, 2014 just 1 thing i see the sale amount, but the original price? what you mean? that price disappeared? Link to comment Share on other sites More sharing options...
alfredopacino Posted February 11, 2014 Author Share Posted February 11, 2014 (edited) what you mean? that price disappeared? nothing disappeared, i want to show this: 100$ -10% 90$ with your code i see: -10% 90$ ps: dont worry sooner or later i will buy you guys a HUGE donation beer Edited February 11, 2014 by alfredopacino (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted February 12, 2014 Share Posted February 12, 2014 ok i understand you can just use this variable: {convertPrice price=$productPriceWithoutReduction} 1 Link to comment Share on other sites More sharing options...
alfredopacino Posted February 24, 2014 Author Share Posted February 24, 2014 (edited) since the pascalvg code shows the original price in product not in sale too, something like that: 100$ 100$ at the end i changed my mind, shows just the original price is enough, im using just this part {if $product.price_without_reduction neq $product.price} <span class="price-original"> {if !$priceDisplay} {displayWtPrice p=$product.price_without_reduction} {else} {displayWtPrice p=((($product.price_without_reduction) / (1 + ((($product.rate|intval) / 100)|floatval)))|floatval)} {/if} </span> {/if} thanks to all Edited February 24, 2014 by alfredopacino (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts