Jump to content

Show promotion date price in product


Recommended Posts

  • 1 month later...

Thanks for the info, but date display is formated as yyyy-mm-dd hh:mm:ss Any idea how can I format it like dd.mm.yyyy? Thanks!

And, in addition, the date format in localization -> languages for my country is set the way I want it. But date is not displayed using the set format...

Link to comment
Share on other sites

And, in addition, the date format in localization -> languages for my country is set the way I want it. But date is not displayed using the set format...

Got it!

 

I've seen that history.tpl uses

{dateFormat date=$order.date_add full=0}

to display the order date.

 

So i have changed

{$product->specificPrice['to']

in product.tpl into

{dateFormat date=$product->specificPrice['to']}.

Now it's displayed using the country format.

  • Like 1
Link to comment
Share on other sites

  • 5 months later...

You can use {$product->specificPrice['to']} and {$product->specificPrice['from']} if your prestashop version is 1.5.

For both Prestashop 1.5 and 1.6 , you should use this function: 

SpecificPrice::getSpecificPrice

to get all informations about product's special price! We used that way to get the Special Price's time to display Prestashop  countdown discount

Edited by DeJour (see edit history)
  • Like 1
Link to comment
Share on other sites

  • 1 year later...
×
×
  • Create New...