在 magento 中取消设置运输并重新计算总计
这是我的问题:
当我将电子课程(无运费)和常规产品(有运费)添加到我的购物车并在结账时选择运费时,成本会在报价中设置。如果我在设置后离开结帐,然后删除已发货的产品,则运费仍会在报价中设置,并且我无法取消设置......即使删除报价中的所有项目。
我试图弄清楚如何在从购物车中删除产品后取消设置运输方式并重新计算总数。
Here is my problem:
When I add an E-course (no shipping) and a regular product (has shipping) to my cart and select shipping during checkout the cost gets set in the quote. if I leave checkout after this has been set and then remove the product that has shipping, the shipping cost is still set in the quote and I can't unset it...even by removing all items in the quote.
I'm trying to figure out how to unset the shipping method and recalculate the totals after a product is removed from the cart.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
有些东西会缓存在报价和送货地址模型中,因此如果您更改报价项目或送货,您必须执行此操作以使 Magento 重新计算总数:
它对我有用。 Magento 通常会在报价更改后将客户重定向到购物车或另一个页面,因此通常它必须在每次页面加载时计算一次总计。
A few things are cached in Quote and Shipping Address model, so you have to do this to make Magento recalculate totals if you change qoute items or shipping:
It worked for me. Magento normally redirects the customer to the cart or to another page after any quote change, so normally it has to calculate totals once per page load.
如果您以编程方式执行此操作,则可以尝试以下操作:
If you are doing it programmatically then you can try this: