Jump to content

[SOLVED] Show Current Year in E-mails


Recommended Posts

Hi,

Is possible to pass current year to customer e-mails? Ex.: Wecome Mail show in the end the year like 2010. I know it is possible in smarty doing {'Y'|date} but how to put it in mails?

I know i need to modify some files (all the send:Mail) with the code to pass the year, but how to do that?


Thanks for your help.

Regards

Mozack

Link to comment
Share on other sites

To add a year variable to the "Welcome" email, change line 113 of authentication.php (in PrestaShop v1.3.1) from:

array('{firstname}' => $customer->firstname, '{lastname}' => $customer->lastname, '{email}' => $customer->email, '{passwd}' => Tools::getValue('passwd')), $customer->email, $customer->firstname.' '.$customer->lastname))



to:

array('{firstname}' => $customer->firstname, '{lastname}' => $customer->lastname, '{email}' => $customer->email, '{passwd}' => Tools::getValue('passwd'), '{year}' => date('Y')), $customer->email, $customer->firstname.' '.$customer->lastname))



Then you can put {year} in mails//account.html and account.txt where you want the year.

Link to comment
Share on other sites

×
×
  • Create New...