gpt4 book ai didi

Magento "Forgot Password"电子邮件以错误的语言发送

转载 作者:行者123 更新时间:2023-12-02 12:02:04 24 4
gpt4 key购买 nike

我有一个具有多种语言的 Magento 网站。我已经设置了语言包,网站上的所有内容似乎都能正确翻译。此外,交易电子邮件均以正确的语言发送,“忘记密码”电子邮件除外,该电子邮件始终以德语发送。这是我所做的:

  • 安装了语言包并确保所有模板和文件夹结构均正确。示例:/app/locale/nl_NL/template/email/
  • 系统 » 事务性电子邮件下:我应用了模板,选择了区域设置并保存。
  • 然后,我转到系统 » 配置 » 销售电子邮件,从“当前配置范围”下拉列表中切换到每种语言,并选择了在中创建的模板每种语言的交易电子邮件(每个商店 View )。

在网上寻找解决方案后,似乎其他人也遇到了这个问题,有人提到 Magento 正在从 /app/locale/中找到的第一个语言环境文件夹中选择“忘记密码”模板 。就我而言,我有:de_DEen_USfr_FRnl_NL。因此它从德语 de_DE 包中选择模板。

注意:此外,在后端的“配置”下,左侧有一个名为“LOCALE PACKS”的选项卡,其下只有“Locale de_DE”,即使我有其他语言包不要出现在这里。不确定这是否相关。

网站:http://site1.cp1.glimworm.com/magento/

Magento 社区版本:1.7.0.2

语言环境包:

  • Mage_Locale_en_US
  • Locale_Mage_community_de_DE
  • Locale_Mage_community_fr_FR
  • Mage_Locale_nl_NL

知道如何从要发送的相应语言获取正确的电子邮件模板,而不是始终使用德语吗?任何帮助将不胜感激!我也可以提供更多信息。

最佳答案

我在 magento v1.5 中遇到同样的问题。经过长时间的研究,我发现了这个解决方案并且它对我有用。

Mage/Customer/Model/Customer.php

in this file i have make some changes as following.
find this line of code
if (!$storeId)
{
$storeId = $this->_getWebsiteStoreId($this->getSendemailStoreId());
}

and replace with

$storeId = ($storeId == '0')?$this->getSendemailStoreId():$storeId;
if ($this->getWebsiteId() != '0' && $storeId == '0')
{
$storeIds = Mage::app()->getWebsite($this->getWebsiteId())->getStoreIds();
reset($storeIds);
$storeId = current($storeIds);
}

关于Magento "Forgot Password"电子邮件以错误的语言发送,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17400660/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com