【问题标题】:Magento DHL Domestic Shipping Not WorkingMagento DHL 国内运输不工作
【发布时间】:2017-05-05 14:20:33
【问题描述】:

我已将 DHL 方法集成到 magento 1.9.2.4 中,但存在一个问题。我的原籍国是 AE,当我尝试在同一个国家订购 AE 的东西时,DHL 方法不适用于所有其他国家。我已经联系了 DHL,他们说 magento 日志文件中的标签必须是 N。目前得到Y

谁能告诉我原来的问题是什么以及如何将标签编辑为 N ?

谢谢。

【问题讨论】:

  • 你好,你解决了吗?
  • @Riccardo 是的,我修好了。
  • 我也遇到了类似的问题,你能分享一下你的解决方案吗?
  • @Riccardo:请分享您的完整问题。和magento的默认dhl文件。我可以帮你修好。

标签: php magento shipping dhl


【解决方案1】:

好的,这里是我成功解决的这个问题的完整答案。

在此处替换 DHL 功能。 app/code/core/Mage/Usa/Model/Shipping/Carrier/Dhl/International.php。确保您在本地制作副本,然后进行更改。

在这个文件中把这个函数改成下面给出的。

受保护的函数 _checkDomesticStatus($origCountryCode, $destCountryCode){ $this->_isDomestic = false;

$origCountry = (string)$this->getCountryParams($origCountryCode)->name;
$destCountry = (string)$this->getCountryParams($destCountryCode)->name;
$isDomesticOrig = (string)$this->getCountryParams($origCountryCode)->domestic;
$isDomesticDest = (string)$this->getCountryParams($destCountryCode)->domestic;

if (($origCountry == $destCountry) || ($isDomesticOrig && $isDomesticDest)) {
    $this->_isDomestic = true;
}

return $this->_isDomestic;

}

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-03-31
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-09-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多