0

I want to get SKU and Order ID from Magento database and I know how to get them individually. The problem is I need to get SKU for the product that the order id points towards. I can't figure out the relation between sales_order_flat_table and catalogue_product_entity. I think there are other tables in between that I am missing. May be I should use some id in sales_flat_order_table to get product id and then get SQL.

0

you should use also the following tables and fields in your query: sales_flat_order_item [quote_item_id]

sales_flat_quote_item [product_id]

| improve this answer | |
0

the order items are not "product entity " but "order_items entity". The order item contains the product_id.

You are missing the sales_flat_order_item table.

| improve this answer | |

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.