Ijas Ameenudeen
Ijas Ameenudeen

Reputation: 9259

Export Prestashop products

I need to export all Products in Prestashop to an Excel file. I built the module to export it to an Excel file. But the SQL query I am using is lacking some fields. Is anyone there to help me to get the following fields from the database ?

ID, TITLE, Quantity, Out of Stock, Quantity(min), Price, Date Added,
Last Modified Date, (plus all feature values)

Upvotes: 0

Views: 2630

Answers (1)

Staple
Staple

Reputation: 712

This is the format you are after - you'll need to chop and change the fields (look at your db in phpmyadmin or similar to get column titles/tables) to get exactly what you are after:

SELECT p.`id_product`, price, `name`, `description`, `link_rewrite`
FROM `ps_product` as p
LEFT JOIN `ps_product_lang` pl ON (pl.`id_product` = p.`id_product`) 
WHERE pl.`id_lang`= 1 GROUP BY p.`id_product`';

Upvotes: 1

Related Questions