0

I have created a custom attribute that shows in product detail page like colour and size attribute, I want them to be saved on order placement so that i can retrieve them in order information, order email.

I am not sure how to achieve this, Right now I am displaying the custom attribute of product in order but the value changes when i change the value in product backend, I must show the value which is saved during order placement.

  • Are you saving that custom attribute value to order item (sales_order_item) table? if yes, then you can get that easily wherever you want. – Himmat Paliwal Dec 3 '18 at 6:24
0

To achieve this , You have to follow the below sub-task to achieve this

  1. Create a custom module
  2. Add a custom filed in sales_order_item table to save your product attribute's value.
  3. Create an observer class and save product attribute's value while place order event will trigger

Below links will help you.

You can follow below tutorial to create a new module

how to add extra field in 'order_item' table when product order success?

  • Thank you is there a blog containing example – fernandus Dec 7 '18 at 19:15

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.