1

How can edit the date format, in email template without editing phtml. ? i was used "Date : {{var order.getCreatedAt()}}", Output like "2016-08-19 09:15:44", I need remove the time in email template only. i used. {{var order.getCreatedAt()|formatDateTime:F j, Y}} is not working. please tell me how can show "2016-08-19" on email template please help me?

0

Just fallback order.php, /app/code/local/Mage/Sales/Model/Order.php, in that add a new function

Public function getCreatedAtOnlyDate(){
 return Mage::helper('core')->formatDate($this->getCreatedAtStoreDate(), $format, false);
}  

In Email Template, {{var order.getCreatedAtOnlyDate('short')}}

It will work I guess.

  • I want get the answer without tough php file or phtml file. – Crock Aug 19 '16 at 12:56
  • I will try to check it – Vigna S Aug 19 '16 at 12:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.