1

we use 1 set of email templates for multiple stores. Logo and store name come from variables per store.

Now I would to add a short text block with a link (diff per store view), something like:

Follow us on facebook: LINK_TO_FB

Now how would I set a variable LINK_TO_FB that grabs the value set per store?

Thanks!

1

You first need to define your variable as a system config one. If you are unsure how to do this, follow http://inchoo.net/ecommerce/magento/create-configuration-for-your-magento-extension/.

Next, override Mage_Core_Model_Source_Email_Variables and add the newly defined path to the constructor. This will make your variable visible in the "Insert Variable" pop-up from the email template edit screen. Insert the variable in the template and also make sure you define different Facebook links per storeview. They will appear properly in the emails.

| improve this answer | |
  • THx Paul. We did that. Now we are running into a new problem - because these config path variables are being found in the email and NL templates, but not in the custom variables ..... See here: magento.stackexchange.com/questions/6552/… – snh_nl Aug 8 '13 at 14:12

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.