Hi I'm very new to Magento 2.
It is retrieved from the weight field on Product Detail Page when the item is purchased. However, it should not change when the weight field on Product Detail Page is edited after the purchase.
Is there such field on Magento 2 db? If so, please let me know the sql.
Thank you for your help in advance!
Solved! Go to Solution.
HI @makoto_matsumot,
Basically magento stores product data in EAV tables. When you update any product then these are updated.
Once you add a product into cart then magento stores that product data into quote_item table. It will change (if product weight is updated) untill you place the order.
If you place the order then product data are stored in the sales_order_item table. It will never change.
If you place any new order then also there will be new row entry, but previous one will never change.
I hope it is clear now, or ask if you have any question.
The sales_order_item table
Hello @makoto_matsumot
The product weight is stored in the quote_item table and sales_order_item table.
Hope it helps.
Thank you Meetanshi!
These two tables have the weight recorded when the item is purchased so even if I change the weight of item on Product page after the purchase, these two tables are not affected at all. Is this correct?
April 1st, 2019) Item A(400g) is purchased
May 2nd, 2019) Item A's weight is edited from 400g to 500g
Item A's weight on both quote_item and sales_order_item is still 400g
Hello again @makoto_matsumot
The sales_order_item table is not affected until the next order is placed.
Hope it helps.
HI @makoto_matsumot,
Basically magento stores product data in EAV tables. When you update any product then these are updated.
Once you add a product into cart then magento stores that product data into quote_item table. It will change (if product weight is updated) untill you place the order.
If you place the order then product data are stored in the sales_order_item table. It will never change.
If you place any new order then also there will be new row entry, but previous one will never change.
I hope it is clear now, or ask if you have any question.
The sales_order_item table