Magento 重量范围
现在我的 3 个商店都用完了一个数据库,我遇到了一个不可预见的问题。
其中一艘商店的船舶使用 UPS XML 计算从欧洲发出的运费,另一艘美国的船舶也使用 UPS XML。
问题是,由于每种产品的重量都具有全球范围,因此我在计算运费时遇到了真正的问题,因为它采用相同的值并在美国将其用作 LBS,然后在欧洲将其用作 KGS。
按照设计,UPS 在欧洲只能使用 KGS,在美国只能使用 LBS。
我无法找到有关此主题的任何信息。有没有人找到解决这个问题的方法?
Now that I have 3 stores running out of one database I've run into an unforeseen problem.
One of the stores ships calculates shipping from Europe using UPS XML, the other US also using UPS XML.
The issue is that since the weight for each product has global scope I have a real issue in calculating shipping since it takes the same value and uses it as LBS in the US, and then KGS in Europe.
By design UPS can only use KGS in Europe and only LBS in the US.
I haven't been able to find any information on this topic. Has anyone found a way to deal with this problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不确定在商店的基础上启用设置是否可以解决问题 - 这取决于底层代码是否实际正确检查设置。但值得一试。
要在商店级别激活“承运人 -> UPS -> 重量单位”配置选项而不仅仅是网站/全球,您可以更改放置在此处的核心 XML(不推荐):
并查找选项
下的 ;0
-> <字段> -> <测量单位>
。将其更改为1
,保存即可完成设置。为了以更好、灵活且升级友好的方式覆盖此选项,您需要创建一个模块。
在文件夹
magento/app/code/local
内创建文件夹结构MyModules/XMLoverrides/etc
。在该文件夹
magento/app/code/local/MyModules/XMLoverrides/etc
中创建两个文件,config.xml
和system.xml
。对于
config.xml
文件,粘贴此内容并保存:对于
system.xml
,粘贴此文本并保存文件。您还需要在文件夹
magento/app/etc/modules
中创建文件MyModules_XMLoverrides.xml
并保存它。应该是这样,即使您升级 Magento 并且原始 system.xml 文件可能会被覆盖,它也会继续覆盖此选项。
现在请祈祷更改此设置确实有帮助,并且我未经测试的模块示例代码可以工作。 :)
I'm not sure enabling the setting on store basis will solve the issue - it depends on if the underlaying code actually checks for the setting correctly. But it is worth a shot.
To activate the "Carriers->UPS->Weight Unit" configuration option on store level instead of just website/global you can change the core XML (not recommended) placed here:
And look up the option
<show_in_store>0</show_in_store>
under<ups> -> <fields> -> <unit_of_measure>
. Change that to<show_in_store>1</show_in_store>
, save and you should be all set.For the nicer, flexible and upgrade friendly way to override this option you need to create a module.
Create the folder structure
MyModules/XMLoverrides/etc
inside the foldermagento/app/code/local
.Inside that folder
magento/app/code/local/MyModules/XMLoverrides/etc
create two files,config.xml
andsystem.xml
.For the
config.xml
file, paste this content and save:And for
system.xml
, paste this text and save the file.You also need to create the file
MyModules_XMLoverrides.xml
inside the foldermagento/app/etc/modules
with the content:and save it. That should be it, and it will continue to override this option even when you upgrade Magento and the original system.xml file might be overwritten.
Now just cross your fingers that changing this setting really helps, and that my untested module example-code works. :)