Peyman-green Posted December 16, 2010 Share Posted December 16, 2010 Hello sorry for my bad english grammar.I have a question about home featured module. I want when home featured module show special products , show first price & special price too. I use this bottom code on the homefeatured.tpl , but i have one problem, this code show special price for all products. {if !$priceDisplay}{displayWtPrice p=$product.price_without_reduction} Please help me. thanks Link to comment Share on other sites More sharing options...
picarry Posted January 6, 2011 Share Posted January 6, 2011 UP...., i also want to know this Q's answer. Link to comment Share on other sites More sharing options...
giibbo Posted March 5, 2011 Share Posted March 5, 2011 You need to add an IF statement like this....{if $product.on_sale}Was {convertPrice price=$product.price_without_reduction} Now{/if}Also if you want to display it on category pages edit product-list.tpl add code like this (note: ive added my own classes to it and formated it with break tags to suit my own them. Sorry about the formatting Im kinda rushed. You have to add an {else} statement to get it display properly.{if $product.on_sale}Was {convertPrice price=$product.price_without_reduction} {else} {/if} {if $product.on_sale} {if !$priceDisplay}Now {convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if} {else} {if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if} {/if}Regards Paul Link to comment Share on other sites More sharing options...
MBuggy Posted September 21, 2011 Share Posted September 21, 2011 Another option would be to modify homefeatured.tpl from: <p class="price_container"><span class="price">{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}</span></p> into: <p class="price_container">{if $product.on_sale}<span class="price">{l s='On sale!' mod='homefeatured'}</span> <span class="price-discount">{if !$priceDisplay}{displayWtPrice p=$product.price_without_reduction}{else}{displayWtPrice p=$priceWithoutReduction_tax_excl}{/if}</span> {if $product.reduction_percent}<span class="reduction"> (-{$product.reduction_percent}%)</span>{/if} {/if} <span class="price">{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}</span></p> This will let u translate in backoffice "On Sale!" and also shows reduction percentage. This will work in PrestaShop versions 1.2.x and 1.3.x 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