cancel
Showing results for 
Search instead for 
Did you mean: 

Transactional Email Variable Error

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.

 

1 REPLY 1

Re: Transactional Email Variable Error

@lholub

 

Instead of website Id please try to pass the Store ID, may be it will solve your problem.

Was my answer helpful? You can accept it as a solution.
175+ Professional Extensions for M1 & M2
Need a developer?Just visit Contact Us Now