- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Transactional Email Variable Error
Hi
i am having some trouble with the variables used in the magento transactional EMails. We have magento 1.9.2.1 installed and several extensions of which some send customized transactional Emails. The different store views have their own Templates (basically similar templates with small changes e.g. different logo) an Emails to users are basically send like this
Mage::getModel('core/email_template') ->sendTransactional( Mage::getStoreConfig('path/to/config',$user->getWebsiteId()), 'support', $user->getEmail(), $user->getName(), array('stuff' => $stuff,'store' => Mage::getStoreConfig('general/store_information/name',$user->getWebsiteId())), $user->getWebsiteId() );
This works perfectly fine, except for one case. We use template vars like {{config path="general/store_information/address"}} and it works fine, always setting the correct address configured for the store view of the user. The sender Email and template also change, but the var {{config path="general/store_information/name"}} does not. However using
Mage::getStoreConfig('general/store_information/name',$user->getWebsiteId())
returns the correct store name. As you see above i used this as a workaround by passing the variable to the template manually but this is no permanent solution for us.
Thank you in advance for helping in this case, i did not find any related threads out there.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Transactional Email Variable Error
Instead of website Id please try to pass the Store ID, may be it will solve your problem.
200+ Premium Magento 2 Extensions Need help? Hire Magento Developer