我有一个 Mageneto 1.4 安装,当订单被搁置时会发送一封定制的电子邮件。这一切都很完美,但它只会发送英文电子邮件。当订单从英语和德语商店进来时,他们仍然会收到英语电子邮件。
我目前使用的 holdAction 方法如下所示:
public function holdAction()
{
if ($order = $this->_initOrder()) {
try {
$order->hold()
->save();
$this->_getSession()->addSuccess(
$this->__('Order was successfully put on hold.')
);
$emailTemplate = Mage::getModel('core/email_template')
->loadDefault('customer_payment_declined');
$emailTemplateVariables = array();
$emailTemplateVariables['order'] = $order;
$emailTemplateVariables['customername'] = $order->getCustomerName();
$processedTemplate = $emailTemplate->getProcessedTemplate($emailTemplateVariables);
$emailTemplate->setSenderName('example.com');
$emailTemplate->setSenderEmail('customerservice@example.com');
$emailTemplate->setTemplateSubject('Your order – '.$order->getIncrementId());
$emailTemplate->send($order->getCustomerEmail(),$order->getCustomerName(), $emailTemplateVariables);
}
catch (Mage_Core_Exception $e) {
$this->_getSession()->addError($e->getMessage());
}
catch (Exception $e) {
$this->_getSession()->addError($this->__('Order was not put on hold.'));
}
$this->_redirect('*/sales_order/view', array('order_id' => $order->getId()));
}
}
我尝试过以各种方式通过语言环境,但我没有任何运气。
有什么建议么?