Jump to content

Specific price end date


ps2k11

Recommended Posts

When I had Prestahop 1.4 was able to do this

now Prestashop 1.6.1.17 seems impossible and frustrating

trying to display specific price end date on product page and cannot find any info how to do this

hard to believe writers never thought to add this option

how is a customer supposed to know when product promotion ends ?

it seems that Prestashop writers dont shop online

 

Anybody knows how ? dont want to wait years to get an answer

 

 

Link to comment
Share on other sites

For simple display of end date you can try with this code

			{if isset($product->specificPrice.to) && ($product->specificPrice.to|date_format:'%d-%m-%Y' > $smarty.now|date_format:'%d-%m-%Y')}
				{l s='Promotion ends: '}<span class="specific_price_to">{$product->specificPrice.to|date_format:'%d-%m-%Y'}</span>
			{/if}

This is for product page so edit product.tpl in your theme. You can change format of date.

Note this is base solution that does not take into account specific prices by combination or some other rules. 

But for full solution there could be some module out there.

  • Thanks 1
Link to comment
Share on other sites

On 2/7/2018 at 7:05 AM, razaro said:

For simple display of end date you can try with this code


			{if isset($product->specificPrice.to) && ($product->specificPrice.to|date_format:'%d-%m-%Y' > $smarty.now|date_format:'%d-%m-%Y')}
				{l s='Promotion ends: '}<span class="specific_price_to">{$product->specificPrice.to|date_format:'%d-%m-%Y'}</span>
			{/if}

This is for product page so edit product.tpl in your theme. You can change format of date.

Note this is base solution that does not take into account specific prices by combination or some other rules. 

But for full solution there could be some module out there.

 

Tried that, doesn't work. Nothing get's displayed

I'm guessing nobody know how to do it

Link to comment
Share on other sites

  • 10 months later...
  • 1 year later...
On 2/7/2018 at 12:05 PM, razaro said:

For simple display of end date you can try with this code


			{if isset($product->specificPrice.to) && ($product->specificPrice.to|date_format:'%d-%m-%Y' > $smarty.now|date_format:'%d-%m-%Y')}
				{l s='Promotion ends: '}<span class="specific_price_to">{$product->specificPrice.to|date_format:'%d-%m-%Y'}</span>
			{/if}

This is for product page so edit product.tpl in your theme. You can change format of date.

Note this is base solution that does not take into account specific prices by combination or some other rules. 

But for full solution there could be some module out there.

Hi.

I have tried this code and work fine, but I need the code for beginning of promotion too, I have tried "from" in code but dosen't work, can you help please?

Sorry for the "post digging"

Edited by kalu
erro in word (see edit history)
Link to comment
Share on other sites

  • 3 months later...

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...