In the email templates we use the email address of the shop ([email protected]), as plain text, and a custom logo with the name of the shop in it (shopname_email.png). Now, for each store, we have to create new templates, and replace logo name and email address. I would like to use one standard template that doesn't have to be changed for each shop.
I would like to use something like {{store.email}}
and {{store.code}}
in the templates. The store name is not good, as some stores will have names with spaces and special characters, and these names are not fixed, can change in the future. Defining a variable in the admin might be a solution, if that can be used in the templates, but looking at it variable values are fixed for all stores so I think this cannot be used. Something that can produce "shopname" (depending on the store) would do.
Below you see my accepted answer. It's great because that way you can create any value using PHP, like the domain name. I just found out that for me, there is a simpler solution that can be handled in the admin entirely.
- Create a custom variable in System > Custom variables
- Save this variable, go to the list of custom variables, and open the new variable again.
- Now you see that you can change the value of the variable per shop.
- Insert the variable in your email template
Et voilà!