ecommerceManager Posted September 4, 2020 Share Posted September 4, 2020 (edited) Hola, estuve leyendo en varias páginas algunas consultas SQL que indican como exportar combinaciones, encontré una consulta que puedo interprentar. Al realizarla me exporta y puedo abrir un excel, pero no cuenta con los precios, y necesito los precios y stock de cada combinación para luego poder actualizar. Quisiera saber si alguien puede ayudarme! Utilizo Prestashop 1.7.5.2 La consulta es: SELECT pat.id_product , prd.reference , GROUP_CONCAT(DISTINCT(concat(atgl.name, ":", atg.group_type, ":", atg.position)) SEPARATOR ", ") , GROUP_CONCAT(DISTINCT(concat(pal.name, ":", atg.position)) SEPARATOR ", ") , pat.supplier_reference , pat.reference FROM astr_product_attribute pat INNER JOIN astr_product prd ON (prd.id_product = pat.id_product) LEFT JOIN astr_product_attribute_combination pac ON (pat.id_product_attribute = pac.id_product_attribute) LEFT JOIN astr_attribute att ON (pac.id_attribute = att.id_attribute) LEFT JOIN astr_attribute_group atg ON ( atg.id_attribute_group = att.id_attribute_group) LEFT JOIN astr_attribute_group_lang atgl ON ( atgl.id_attribute_group = atg.id_attribute_group) LEFT JOIN astr_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 Gracias Edited September 4, 2020 by ecommerceManager (see edit history) 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