1

Sending email based on locale that user selected.

enter image description here

$locale='en_US';
$emailTemplate  = Mage::getModel('core/email_template')
                                ->loadDefault('test_reminder_email');               
$emailTemplate->setDesignConfig(array('area' => 'frontend', 'store' => $iDefaultStoreId));
$emailTemplate->setSenderName(Mage::getStoreConfig('trans_email/ident_general/name'));
$emailTemplate->setSenderEmail(Mage::getStoreConfig('trans_email/ident_general/email')); 
$subject=$product->getName().$this->__(' test Ended');
$emailTemplate->setTemplateSubject($subject);  
$emailTemplateVariables = array();
$processedTemplate = $emailTemplate->getProcessedTemplate($emailTemplateVariables);
$emailTemplate->send($customer->getEmail(),$customer->getName(), $emailTemplateVariables,$storeId=null);
2
$locale='en_US';
$emailTemplate = Mage::getModel('core/email_template')
                 ->loadDefault('test_reminder_email', $locale);

will try loading the en_US email template.

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.