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?

1 Answer 1

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.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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