KöveZoli Posted January 31, 2017 Share Posted January 31, 2017 Sziasztok, Nem tudom, volt-e már, de íme egy lekérdezés a kombinációkhoz: SELECTp.id_product,pa.reference,pl.name,GROUP_CONCAT(DISTINCT(pal.name) SEPARATOR ", ") as combination,p.price,pq.quantityFROM ps_product_attribute paLEFT JOIN ps_product p ON (p.id_product = pa.id_product)LEFT JOIN ps_stock_available pq ON (p.id_product = pq.id_product AND pa.id_product_attribute = pq.id_product_attribute)LEFT JOIN ps_product_lang pl ON (p.id_product = pl.id_product)LEFT JOIN ps_product_attribute_combination pac ON (pa.id_product_attribute = pac.id_product_attribute)LEFT JOIN ps_attribute_lang pal ON (pac.id_attribute = pal.id_attribute)WHERE pl.id_lang = 2AND pal.id_lang = 2GROUP BY pa.referenceORDER BY p.id_product, pac.id_attribute A szülő termék (én csak így hívom a termék alapot) ID-ját, a kombináció nevét, cikkszámát, a kombinációt(pl: fekete,XS), az árat és a mennyiséget listázza ki. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now