koko Posted July 15, 2016 Share Posted July 15, 2016 hello, i are triying to get all product whit all atributes and ean, price etc but when i use sql i take all time sam ean code, mi sql its this SELECT pat.id_product_attribute , prd.reference , pacc.ean13 , pl.name , GROUP_CONCAT(DISTINCT(concat(pal.name)) SEPARATOR ", ") AS Talla_Color , pat.supplier_reference , pat.reference , pacco.wholesale_price As Precio_Compra , round( pacco.price*1.21, 2) As PVP , round( pacco.wholesale_price*1.36, 2) As PVP_Amazon_Minimo , pati.quantity AS Stock FROM ps_product_attribute pat INNER JOIN ps_product prd ON (prd.id_product = pat.id_product) LEFT JOIN ps_product_attribute_combination pac ON (pat.id_product_attribute = pac.id_product_attribute) LEFT JOIN ps_attribute att ON (pac.id_attribute = att.id_attribute) LEFT JOIN ps_product_lang pl ON (pat.id_product = pl.id_product) LEFT JOIN ps_stock_available pati ON (pat.id_product = pati.id_product) LEFT JOIN ps_product pacco ON pacco.id_product = pat.id_product LEFT JOIN ps_product_attribute pacc ON pacc.id_product = pat.id_product LEFT JOIN ps_attribute_group atg ON ( atg.id_attribute_group = att.id_attribute_group) LEFT JOIN ps_attribute_group_lang atgl ON ( atgl.id_attribute_group = atg.id_attribute_group) LEFT JOIN ps_attribute_lang pal ON (pac.id_attribute = pal.id_attribute AND pal.id_lang = atgl.id_lang) WHERE atgl.id_lang = 1 GROUP BY pat.id_product_attribute ORDER BY pat.id_product, pac.id_attribute Thanks for all 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