Jump to content

how to show special price on the home featured blocks ?


Recommended Posts

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

35372_xncKCJW2xpFctd5kJwKS_t

Link to comment
Share on other sites

  • 3 weeks later...
  • 1 month later...

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

39665_QyIRWafoEeVhOzlcMjf0_t

39666_eN7yVQWlzydtg0i89Igs_t

Link to comment
Share on other sites

  • 6 months later...

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

post-278701-0-76999300-1316622879_thumb.jpg

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...