根据折扣/优惠券代码在 Magento 中设置税率
我一直在尝试根据使用的折扣代码为 magento 设置税率或客户等级税率。我只使用折扣代码,因为我可以使用它作为输入。
有谁知道如何实现这一点或有任何指示吗?
亲切的问候
克里斯
I've been trying to set a tax rate or customer class rate for magento based on the discount code used. Im only using the discount code as I can use it for a input.
Does anyone have any idea how this can achieved or any pointers?
Kind Regards
Chris
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
没有默认的方法可以做到这一点。您应该通过管理员为他们设置客户的类别,这样他们就可以始终获得特定的税率,而无需输入任何内容。
There is no default way of doing this. You should set the customer's class for them through admin, that way they get their specific tax rate always without having to input anything.
这就是我最终为此所做的。应该证明非常有用。将此文件 app/code/core/Mage/Tax/Model/Calculation.php 复制到 app/code/local/Mage/Tax/Model/Calculation.php 然后在第 178 行有这个函数,
我已将其更改为此。根据我对此项目的要求,它是一个硬编码的折扣代码和产品税类别 ID。
干杯对此的帮助
This is what I ended up doing for this. Should prove quite useful. Copy this file app/code/core/Mage/Tax/Model/Calculation.php to app/code/local/Mage/Tax/Model/Calculation.php then on line 178 theres this function
I've changed this to this. Its a hardcoded Discount Code and Product Tax Class Id based on my requirements for this project.
Cheers for the help on this