Magento 定制运费
有没有办法在magento中添加自定义运费到购物篮(订单)而不是从管理员而是在编程中。
我需要的是,我将有一个包含每个产品“shipping_cost”的字段,现在假设客户向购物篮添加了 3 个产品,现在订单的运费将是产品的 Shipping_costs 中最高的。例如,这 3 种产品的运费分别为 $10、$20 和 $30,因此购物篮的运费将为 $30。
Is there a way to add a custom shipping rate for to basket (order) in magento not from admin but in programing.
What I need is, I will have a field with each product "shipping_cost" , now suppose customer added 3 products to basket, now the shipping cost of the order will be the highest of shipping_costs of the products. For example, the 3 products have shipping_costs like $10, $20 and $30 , so the shipping_cost for basket will be $30.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,根据您的情况,您需要获取最高运费并将该值分配给
$shippingprice
。您可以使用给定代码在 magento 中添加订单的自定义运费:它将更新您的运费和总计。我想这对你会有帮助。
Yes, in your condition you need to get maximum shipping rate and assign that value to
$shippingprice
. You can add your custom shipping price for an order in magento using given code:It will update your shipping price and grand total. I guess it will be helpful to you.