Forum Discussion
Hansss
4 years agoFrequent Visitor
Products with combinations
Hi! I run a webshop at www.drakfisken.se. It's based on Prestashop 1.7. I'm a newbe trying to create some Power BI reports. Let's say I sell a red T-shirt in my shop. Prestashop database has a ...
Ashish_Mathur
Super User
4 years agoHi,
Share some data and show the expected result.
Hansss
4 years agoFrequent Visitor
First you can see the product table. Product with id_product 1100 has no variants. The EAN and price is on the product level.
Then you can see that id_product 1100 does not exist in the product attribute table since it has no variants.
Product id_product 1102 exists in both product and product_attribute table since it has variants. The information such as price and EAN is stored on variant level in the product_attribute table. The information in the product table is useless when there are variants.
What I would like to create is ONE table with products with and without variants.
| id_product | id_product_attribute | ean13 | price |
| 1001 | null | 4260507580030 | 188 |
| 1102 | 50 | 4260507580276 | 312 |
| 1102 | 51 | 4260507580283 | 524 |
| 1102 | 2843 | 4260507580269 | 172 |
This information I would then be able to match in good way with the price lists with EAN13 from the suppliers.