I am working with sales_flat_order_item
using direct sql and I can't make sense of why both configurable
and simple
products are inserted into the sales_flat_order_item
table. What is the reason behind this?
It seems like a lot of redundant data to just keep track of whether the product was added via a configurable product page vs a simple product page.
I'm just trying to understand this behaviour in case I'm missing something which could impact the accuracy of my queries.
Best Answer
mageApprentice,Magento used for
business logic
.It main forvariance feature of configurable
.Whenever aconfigurable product cart it save two row one is configurable product details
and another ischild simple product
.But importance thing is that both case sku of two row is same and it is simple sku. As it save two rows,Then you can easily get:Simple and configurable data at any times using **product_id**
It help for coupon apply
.Sales Report
Another,when configurable item c in art you can get simple product image
But in visible of order item only show those item whose
parent_item_id
is null.Thus you can only show configurable product details in order.