views:

23

answers:

1

Hi,

I'm trying to apply the german format of a date to a Magento email. I can get the invoice date with

{{var invoice.created_at}}

but that gives me "2010-05-21 15:46:24". I would like to have 21.05.2010 and PHP doesn't work in the templates.

I'm totally new to Magento so please be patient :-P

Greetz Spanky

A: 

I think you will have to override the method that sends the email to pass the date as a variable to the template (using the fifth argument of the sendTransactional() method).

greg0ire
which class would that have to be and where do I put my class so it get's called automatically?
spankmaster79
This one, maybe : http://docs.magentocommerce.com/Mage_Sales/Mage_Sales_Model_Order.html see this post for overriding : http://stackoverflow.com/questions/2041787/magento-email-templatesIf it does not correspond to your email, grep for the last part of the path where it is located in the classes.
greg0ire
I'll try that one later... thank you
spankmaster79