Jump to content

Product available from...


Recommended Posts

I have a few questions regarding the "available from" fields.

Do they apply only for the "Reduction amount", or the product as a whole?
How can we make them visible in the product listing?
Has anyone made a countdown clock for them that store visitors can see?

Link to comment
Share on other sites

"Available from" applies to the reduction only. The reduction will not be applied before the "Available from" date and time or after the "Available to" date and time. It does not hide the product outside these dates.

You'll need to edit product-list.tpl to add the reductions. It can be quite complicated to do though. It took me a while to figure out how to add the % discount for a client. Here's the code I ended up using in product-list.tpl:

{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}{l s='Price:'} {if $special}{if $product.reduction_price != 0}{convertPrice price=$product.price+$product.reduction_price}{elseif $product.reduction_percent != 0}{math assign='product_price' equation='p / (1 - (r / 100))' p=$product.price r=$product.reduction_percent}{convertPrice price=$product_price}{/if}{/if}{convertPrice price=$product.price}{if $priceDisplay == 2} {l s='+Tx'}{/if}

{if $special}({if $product.reduction_price != 0}{math equation='round((r / (p + r)) * 100)' p=$product.price r=$product.reduction_price}%{elseif $product.reduction_percent != 0}{$product.reduction_percent|floatval}%{/if}){/if}
{/if}

{if $priceDisplay}{l s='Price:'} {if $special}{if $product.reduction_price != 0}{convertPrice price=$product.price_tax_exc+$product.reduction_price}{elseif $product.reduction_percent != 0}{convertPrice price=$product.price_tax_exc+$product.reduction_price}{elseif $product.reduction_percent != 0}{math assign='product_price' equation='p / (1 - (r / 100))' p=$product.price_tax_exc r=$product.reduction_percent}{convertPrice price=$product_price}{/if}{/if}{convertPrice price=$product.price_tax_exc}{if $priceDisplay == 2} {l s='-Tx'}{/if}{if $special}{if $product.reduction_price != 0}{math equation='round((r / (p + r)) * 100)' p=$product.price r=$product.reduction_price}%{elseif $product.reduction_percent != 0}{$product.reduction_percent|floatval}%{/if}{/if}{/if}



The only countdown module I'm aware of is here, but it only counts down the time until the special is over, but until it starts.

Link to comment
Share on other sites

×
×
  • Create New...