Jump to content

The on sale button


Recommended Posts

Hi,

 

I'm on v1.4.4.1 and i need your help.

 

I proceed like this to add a product "on sale" in the admin:

First, i add a specific price in the "price tab" of the product, then i click on the "on sale" checkbox in the "infos" tab to active this "on sale".

 

I would like to display automaticaly the promotion by just adding a specific price (with the reduction percent/reduction_from/reduction_to fields). I don't want to go and uncheck the "on sale" checkbox everytime the promotion is finish.

 

So i tried to edit the product.tpl and product-list.tpl files by adding lines like this:

 

{if ($product->reduction_percent != 0 && $product->currentDate <= $product->reduction_to && $product->currentDate >= $product->reduction_from)}
<img src="{$img_dir}onsale_{$lang_iso}.gif" alt="{l s='On sale'}" class="on_sale_img"/>
<span class="on_sale">{l s='On sale!'}</span>
{/if}

 

But nothing happens.

 

Am i missing something?

 

Thank you for your help.

Link to comment
Share on other sites

×
×
  • Create New...