0

I want to display a custom text in the header.html template for different transactional email templates (order,account,password ....). My idea is to include a block:

{{block type='core/template' area='frontend' template='trans_emails/custom.phtml' type=$trans_template_name}}

Actually i don't know from where I should get the trans. email name. to pass it in the custom.phtml file. In that file I will put some conditions which text will be displayed. My question is how do I get the current transactional email template name ?

thx

2
  • have you need store code like : en_US???
    – Abdul
    Apr 5, 2016 at 7:09
  • yes, is that should be a problem ? or ? Apr 5, 2016 at 7:10

1 Answer 1

1

See sales related template Here:

System->Configuration->Sales Emails

For customer related template see here:

System->Configuration->Customer Configuration

About transactional emails:

  1. By default the templates are in app/locale/en_US/template/email where en_US is the locale code configured for the store.
  2. They can be loaded into the database and edited using an editor within the browser. If an override is done that way, they are no longer loaded from the filesystem.

So first decide, if you want to keep them loading from the file system (and thus be able to version them) or from the database (so the merchant can easily edit the layout).

The footer and header are special:

The template is configured via the system configuration System > Configuration > [General:Design] > Transactional Emails. By default it's set to "Default from locale" which refers to the file app/locale/en_US/template/email/html/header.html. For more detail see here.

2
  • Yeah, but I have more then 10 t . emails template , with the same header. For each t. emails I have a different header text. SO I included a block in header which calls a phtml file, where I want to add that custom text for each template, but to do that I need to pass a variable to the block . My quess is to pass the t. email name (new order, new invoice etc) and in the phtml file I''ll do the following. IF ($x = "new order"){echo "t1"}elseif($x = "new invoice"){echo "t2"}elseif ...... did you got the idea ? Apr 5, 2016 at 7:26
  • Please follow the linked answer it will help you
    – Arunendra
    Apr 5, 2016 at 7:30

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.