0

Which event I have to use? I have need to store product wise shipping tax.

1

As per my understanding I think you have to use Magento extension attribute feature

If you want to learn how to use Magento Extension attribute then I think you can go through with this link :

https://store.fooman.co.nz/blog/an-introduction-to-extension-attributes.html

In your case in extension_attribute.xml of your module you have to add code like this, this is the sample of gift_message column at order item level

<extension_attributes for="Magento\Sales\Api\Data\OrderItemInterface">
<attribute code="gift_message" type="Magento\GiftMessage\Api\Data\MessageInterface" />
</extension_attributes>
1
  • 1
    Use of Magento extension attribute is best idea. – Amit Bera Sep 14 '18 at 4:49
0

I don't think you need to create an extra field on sales_order_item as magento already have tax fields to this table.

enter image description here

5
  • no i have add shipping tax not only tax – Rahul Vaghela Sep 14 '18 at 4:12
  • did you able to create custom field? – Amit Bera Sep 14 '18 at 4:12
  • no i see it first time – Rahul Vaghela Sep 14 '18 at 4:14
  • please donot called me sir... – Amit Bera Sep 14 '18 at 4:33
  • i have done it.. – Rahul Vaghela Sep 14 '18 at 7:07
0

Magento already offers the tax field in it's table. Hence, I don't think you need to create an extra field. However, I can help you out if you can be a bit specific about what you wanna add.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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