I'm trying to set a tax amount on orders that are processed programatically with a custom controller, but can't figure out where to put the number.
我正在尝试为使用自定义控制器以编程方式处理的订单设置税额,但无法确定将数字放在何处。
what I have: A rest response from the 3rd party containing all the info for the order. It's setting the order with my controller just fine for all the attributes except tax (ie, price, shipping, item, addresses, etc) Tax is the last thing I need to figure out.
我拥有的:来自第三方的休息回复,其中包含订单的所有信息。它使用我的控制器设置订单,除了税(即价格,运费,物品,地址等)以外的所有属性都很好。税是我需要弄清楚的最后一件事。
What I need: to take the number they give me in the xml and shove it into the "tax" field of the order.
我需要的是:取出他们在xml中给我的数字并将其推入订单的“税”字段。
What I would like: I'm hoping there's something very simple for this. All the info I've found in my searching is for things that are more complicated. Ideally I'm hoping there something like $quote->setTax('$myVariable');
that I just haven't been able to find yet.
我想要的是:我希望有一些非常简单的东西。我在搜索中发现的所有信息都是针对更复杂的事情。理想情况下,我希望有类似$ quote-> setTax('$ myVariable')的东西;我还没有找到。
As you can probably tell, I'm still quite new to PHP and even more new to Magento, so I really appreciate the help.
你可能会说,我对PHP仍然很陌生,对Magento来说更新,所以我非常感谢你的帮助。
1 个解决方案
#1
0
i fixed this by adding another attribute to the quote and order object and putting it there.
我通过在报价和订单对象中添加另一个属性并将其放在那里来修复此问题。
#1
0
i fixed this by adding another attribute to the quote and order object and putting it there.
我通过在报价和订单对象中添加另一个属性并将其放在那里来修复此问题。