1

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.

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.

As you can probably tell, I'm still quite new to PHP and even more new to Magento, so I really appreciate the help.

2 Answers 2

1

I ended up adding a module to my extension that adds a new fee and line item to the totals. Since I don't need to process the amount at all, or apply any logic other than "if it's there, add it" this was the simplest solution for me.

I learned a lot about it from http://tutorialmagento.com/how-to-add-fee-or-discount-to-order-totals-in-magento and by looking at the extension he had made that is downloadable there.

1

I learned from this article How to Add fee or discount to order totals in Magento 1.9.

There you can find a free module to add fee/discount to order total at: https://github.com/yvoronoy/magento-extension-extra-fee

With the module above, you can only add extra fee. If you want to add more complicated rules, I think you can download the module and edit code files to learn how it works

Hope this helps .

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.