1

I have a custom attribute of a product, that I want to have it's value stored in sales_order_items. I have added an extra column in the table sales_order_items. But How can I store the value of that custom attribute into this extra column in sales_order_items?

1

You need to create custom order attribute for it. And then programmatically assign value for it.

You can follow given thread to create order attribute.

Magento 2 How to create new order attribute programatically

  • I have already created the custom attribute, as well have I also added an extra column in the sales_order_items. I want to know how to copy the data from custom attribute to the sales_order_items. I think the link you attached on shows how to created an extra column in database table, which I have already been able to do. – Magento Learner Apr 24 '17 at 10:43
  • I need the same. please – Abid Malik Sep 13 '18 at 13:46

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.