ADNREV Posted September 9, 2019 Share Posted September 9, 2019 hi i want to export all prestashop products with combination , anyone help me <code> SELECT p.`id_product` AS `ID`, b.name as `Nom`,`reference`, cl.`id_category` AS `ID Cat defaut`, cl.`name` AS `Cat defaut`, GROUP_CONCAT(DISTINCT(c.id_category) SEPARATOR ",") as categories, GROUP_CONCAT(DISTINCT(case when length(im.`id_image`)=6 then concat('https://exampl.com/img/p/',insert(insert(insert(insert(insert(im.`id_image`,2,0,'/'),4,0,'/'),6,0,'/'),8,0,'/'),10,0,'/'),'/',im.`id_image`,'.jpg') when length(im.`id_image`)=5 then concat('https://exampl.com/img/p/',insert(insert(insert(insert(im.`id_image`,2,0,'/'),4,0,'/'),6,0,'/'),8,0,'/'),'/',im.`id_image`,'.jpg') when length(im.`id_image`)=4 then concat('https://exampl.com/img/p/',insert(insert(insert(im.`id_image`,2,0,'/'),4,0,'/'),6,0,'/'),'/',im.`id_image`,'.jpg') when length(im.`id_image`)=3 then concat('https://exampl.com/img/p/',insert(insert(im.`id_image`,2,0,'/'),4,0,'/'),'/',im.`id_image`,'.jpg') when length(im.`id_image`)=2 then concat('https://exampl.com/img/p/',insert(im.`id_image`,2,0,'/'),'/',im.`id_image`,'.jpg') when length(im.`id_image`)=1 then concat('https://exampl.comm/img/p/',insert(im.`id_image`,2,0,'/'),im.`id_image`,'.jpg') else '' end) SEPARATOR ",") as "Images", sa.`price`, ml.meta_title AS 'Marque', ml.id_manufacturer AS 'Marque ID', p.price as price, sa.active as active, p.ean13 AS 'EAN13', p.upc AS 'UPC', sav.`quantity` AS `quantite`, p.visibility, p.indexed, pl.description_short, pl.description, pl.meta_title, pl.meta_keywords, pl.meta_description, MAX(image_shop.id_image) id_image, concat(pl.`link_rewrite`,'-',p.`id_product`,'.html') as "ProductURL google", case when length(im.`id_image`)=6 then concat('https://exampl.com/img/p/',insert(insert(insert(insert(insert(im.`id_image`,2,0,'/'),4,0,'/'),6,0,'/'),8,0,'/'),10,0,'/'),'/',im.`id_image`,'.jpg') when length(im.`id_image`)=5 then concat('https://exampl.com/img/p/',insert(insert(insert(insert(im.`id_image`,2,0,'/'),4,0,'/'),6,0,'/'),8,0,'/'),'/',im.`id_image`,'.jpg') when length(im.`id_image`)=4 then concat('https://exampl.com/img/p/',insert(insert(insert(im.`id_image`,2,0,'/'),4,0,'/'),6,0,'/'),'/',im.`id_image`,'.jpg') when length(im.`id_image`)=3 then concat('https://exampl.com/img/p/',insert(insert(im.`id_image`,2,0,'/'),4,0,'/'),'/',im.`id_image`,'.jpg') when length(im.`id_image`)=2 then concat('https://exampl.com/img/p/',insert(im.`id_image`,2,0,'/'),'/',im.`id_image`,'.jpg') when length(im.`id_image`)=1 then concat('https://exampl.comm/img/p/',insert(im.`id_image`,2,0,'/'),im.`id_image`,'.jpg') else '' end as "ImgURL_1" 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_lang` b ON (b.`id_product` = p.`id_product` AND b.`id_lang` = 1 AND b.`id_shop` = p.id_shop_default) LEFT JOIN `ps_image` i ON (i.`id_product` = p.`id_product`) LEFT JOIN `ps_manufacturer_lang` ml ON (p.id_manufacturer = ml.id_manufacturer) LEFT JOIN `ps_stock_available` sav ON (sav.`id_product` = p.`id_product` AND sav.`id_product_attribute` = 0 AND sav.id_shop_group = 0 AND sav.id_shop = 1 ) JOIN `ps_product_shop` sa ON (p.`id_product` = sa.`id_product` AND sa.id_shop = p.id_shop_default) LEFT JOIN `ps_shop` shop ON (shop.id_shop = p.id_shop_default) LEFT JOIN `ps_image_shop` image_shop ON (image_shop.`id_image` = i.`id_image` AND image_shop.`cover` = 1 AND image_shop.id_shop = p.id_shop_default) LEFT JOIN `ps_product_download` pd ON (pd.`id_product` = p.`id_product`) LEFT JOIN `ps_image` im on im.`id_product`= p.`id_product` WHERE 1 AND pl.id_lang = 1 GROUP BY sa.id_product ORDER BY p.`id_product` ASC </code> Link to comment Share on other sites More sharing options...
MigrationPro Posted September 9, 2019 Share Posted September 9, 2019 Hello ADNREV, Hope you are keeping great! We can help you with export. if interested to PM me for further discussion Have a nice day Link to comment Share on other sites More sharing options...
CedCommerce Team Posted September 10, 2019 Share Posted September 10, 2019 On 9/9/2019 at 12:11 PM, ADNREV said: hi i want to export all prestashop products with combination , anyone help me <code> SELECT p.`id_product` AS `ID`, b.name as `Nom`,`reference`, cl.`id_category` AS `ID Cat defaut`, cl.`name` AS `Cat defaut`, GROUP_CONCAT(DISTINCT(c.id_category) SEPARATOR ",") as categories, GROUP_CONCAT(DISTINCT(case when length(im.`id_image`)=6 then concat('https://exampl.com/img/p/',insert(insert(insert(insert(insert(im.`id_image`,2,0,'/'),4,0,'/'),6,0,'/'),8,0,'/'),10,0,'/'),'/',im.`id_image`,'.jpg') when length(im.`id_image`)=5 then concat('https://exampl.com/img/p/',insert(insert(insert(insert(im.`id_image`,2,0,'/'),4,0,'/'),6,0,'/'),8,0,'/'),'/',im.`id_image`,'.jpg') when length(im.`id_image`)=4 then concat('https://exampl.com/img/p/',insert(insert(insert(im.`id_image`,2,0,'/'),4,0,'/'),6,0,'/'),'/',im.`id_image`,'.jpg') when length(im.`id_image`)=3 then concat('https://exampl.com/img/p/',insert(insert(im.`id_image`,2,0,'/'),4,0,'/'),'/',im.`id_image`,'.jpg') when length(im.`id_image`)=2 then concat('https://exampl.com/img/p/',insert(im.`id_image`,2,0,'/'),'/',im.`id_image`,'.jpg') when length(im.`id_image`)=1 then concat('https://exampl.comm/img/p/',insert(im.`id_image`,2,0,'/'),im.`id_image`,'.jpg') else '' end) SEPARATOR ",") as "Images", sa.`price`, ml.meta_title AS 'Marque', ml.id_manufacturer AS 'Marque ID', p.price as price, sa.active as active, p.ean13 AS 'EAN13', p.upc AS 'UPC', sav.`quantity` AS `quantite`, p.visibility, p.indexed, pl.description_short, pl.description, pl.meta_title, pl.meta_keywords, pl.meta_description, MAX(image_shop.id_image) id_image, concat(pl.`link_rewrite`,'-',p.`id_product`,'.html') as "ProductURL google", case when length(im.`id_image`)=6 then concat('https://exampl.com/img/p/',insert(insert(insert(insert(insert(im.`id_image`,2,0,'/'),4,0,'/'),6,0,'/'),8,0,'/'),10,0,'/'),'/',im.`id_image`,'.jpg') when length(im.`id_image`)=5 then concat('https://exampl.com/img/p/',insert(insert(insert(insert(im.`id_image`,2,0,'/'),4,0,'/'),6,0,'/'),8,0,'/'),'/',im.`id_image`,'.jpg') when length(im.`id_image`)=4 then concat('https://exampl.com/img/p/',insert(insert(insert(im.`id_image`,2,0,'/'),4,0,'/'),6,0,'/'),'/',im.`id_image`,'.jpg') when length(im.`id_image`)=3 then concat('https://exampl.com/img/p/',insert(insert(im.`id_image`,2,0,'/'),4,0,'/'),'/',im.`id_image`,'.jpg') when length(im.`id_image`)=2 then concat('https://exampl.com/img/p/',insert(im.`id_image`,2,0,'/'),'/',im.`id_image`,'.jpg') when length(im.`id_image`)=1 then concat('https://exampl.comm/img/p/',insert(im.`id_image`,2,0,'/'),im.`id_image`,'.jpg') else '' end as "ImgURL_1" 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_lang` b ON (b.`id_product` = p.`id_product` AND b.`id_lang` = 1 AND b.`id_shop` = p.id_shop_default) LEFT JOIN `ps_image` i ON (i.`id_product` = p.`id_product`) LEFT JOIN `ps_manufacturer_lang` ml ON (p.id_manufacturer = ml.id_manufacturer) LEFT JOIN `ps_stock_available` sav ON (sav.`id_product` = p.`id_product` AND sav.`id_product_attribute` = 0 AND sav.id_shop_group = 0 AND sav.id_shop = 1 ) JOIN `ps_product_shop` sa ON (p.`id_product` = sa.`id_product` AND sa.id_shop = p.id_shop_default) LEFT JOIN `ps_shop` shop ON (shop.id_shop = p.id_shop_default) LEFT JOIN `ps_image_shop` image_shop ON (image_shop.`id_image` = i.`id_image` AND image_shop.`cover` = 1 AND image_shop.id_shop = p.id_shop_default) LEFT JOIN `ps_product_download` pd ON (pd.`id_product` = p.`id_product`) LEFT JOIN `ps_image` im on im.`id_product`= p.`id_product` WHERE 1 AND pl.id_lang = 1 GROUP BY sa.id_product ORDER BY p.`id_product` ASC </code> Hello, Hope you are doing well! For exporting bulk products we can help you out. You can PM us or contact us at Here. We'll be happy to help you! Thanks Link to comment Share on other sites More sharing options...
musicmaster Posted September 10, 2019 Share Posted September 10, 2019 Prestools has an option "export as csv". It is free. 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