I am creating an order programmatically in magento but tax is not applied on it. How can i apply tax on order based on address in my script only??
Any help would be appreciated.
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.Sign up to join this community
To create an order programmatically in Magento, you need to create the quote first then you can create the order from the quote.
You need to set
setTotalsCollectedFlag(false) in the quote before you save the quote. This flag will allow Magento auto calculate the tax based on your shipping address.
This article will guide you do it https://jamersan.com/magento-setting-order-quotes-tax-rate-based-on-shipping/