Export products with quantity to CSV file in Prestashop 1.5.*

First off let me say I am not a Prestashop developer and I acquired several Prestashop sites which we´ve now moved over to another platform so this tutorial is how to Export products with quantity to CSV file in Prestashop using the SQL Manager.

Why your doing this is because the exporting of products from Prestashop 1.5.* is pretty woeful and although you can use the export function on the Products pages, this will only let you export one page at a time. Fine if you have a few hundred products, but typically the sites I see have several thousand products and exporting page by page is a major pain in the fingers.

So, First off this tutorial is for version 1.5.* of Prestashop. (Export products with quantity to CSV file in Prestashop 1.5.x)

Secondly, the SQL Manager can be found on the Advanced Parameters menu. So: Advanced Parameters -> SQL Manager

Once you have the SQL Manager in view you need to click the Add new button. This will start the new SQL Manager wizard.

Next give the SQL command a name, Export All should be okay. Then copy and paste the code below into the request box.

SELECT p.id_product, p.active, pl.name, GROUP_CONCAT(DISTINCT(cl.name) SEPARATOR “,”) as categories, p.reference, p.price, p.id_tax_rules_group, p.wholesale_price, p.reference, p.supplier_reference, p.id_supplier, p.id_manufacturer,man.name, p.upc, p.ecotax, p.weight, qp.quantity, pl.name, 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, p.id_shop_default, qp.quantity FROM ps_product p LEFT JOIN ps_stock_available qp ON (p.id_product = qp.id_product) 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) LEFT JOIN ps_manufacturer man ON (man.name = p.id_manufacturer) WHERE pl.id_lang = 1 AND cl.id_lang = 1 AND p.id_shop_default = 1 AND c.id_shop_default = 1 GROUP BY p.id_product

Now click the save button

To use this sql query either click the name to run this within the browser and show results in the browser or click the export button to run the command and save the results as a CSV file.

That´s it you should have a full on CSV file


You May Also Like

2 thoughts on “Export products with quantity to CSV file in Prestashop 1.5.*

  1. Maybe you have not come across Store Manager for PrestaShop – https://www.prestashopmanager.com/
    This is a desktop application. There is import/export wizard that lets import/export data efficiently. When speaking about info upload, info import wizard accepts different file formats (.csv, .xml, .txt, .ods, .xls).

    1. Niles, yes I am aware of it and have several clients who use it to administer their websites but this was a quick dirty solution for cheap skates like me 😉

Leave a Reply

Your email address will not be published. Required fields are marked *

Current day month ye@r *