floreauwe Posted November 16, 2015 Share Posted November 16, 2015 Hy guys! I am searching for a SQL interogation in order to export a CSV with the products I have. I have prestashop 1.4. The data needed ar the following: Product name Category Reference Price tax excl Short description Description URL rewritten Weight Please help me out because I am trying to make it for for more than 3 days. Thank you a lot! Link to comment Share on other sites More sharing options...
Anton_bcn Posted November 26, 2015 Share Posted November 26, 2015 (edited) SELECT p.id_product, p.active, pl.name, GROUP_CONCAT(DISTINCT(cl.name) SEPARATOR ",") as categories, p.price, p.id_tax_rules_group, p.wholesale_price, p.reference, p.supplier_reference, p.id_supplier, p.id_manufacturer, p.upc, p.ecotax, p.weight, p.quantity, pl.description_short, pl.description, pl.meta_title, pl.meta_keywords, pl.meta_description, pl.link_rewrite, pl.available_now, pl.available_later, p.available_for_order, p.date_add, p.show_price, p.online_only, p.condition FROM ps_product p LEFT JOIN ps_product_lang pl ON (p.id_product = pl.id_product) LEFT JOIN ps_category_product cp ON (p.id_product = cp.id_product) LEFT JOIN ps_category_lang cl ON (cp.id_category = cl.id_category) LEFT JOIN ps_category c ON (cp.id_category = c.id_category) LEFT JOIN ps_product_tag pt ON (p.id_product = pt.id_product) WHERE pl.id_lang = 3 AND cl.id_lang = 3 GROUP BY p.id_product; You will need edit prefix (ps_) or id of language you use (id_lang) Edited November 26, 2015 by Anton_bcn (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