roms95200 Posted October 12, 2015 Share Posted October 12, 2015 Bonjour, J'aimerai savoir si est possible d'importer un fichier CSV sur ma boutique afin de mettre à jour mon catalogue. Je m'explique : Mon fournisseur m'avait fournis un fichier CSV qui comprend tout les produits. Je l'ai donc importer sur prestashop et ajouté des photos pour chaque produits. Après avoir ajouté des photos pour chaque produits, je me suis rendu compte que le nom des produits n'était pas optimisé ( ex : "edp" au lieu de "Eau de Parfum" etc ...). J'ai donc fais les modifications directement sur mon fichier CSV. Je souhaite désormais importer ce nouveau fichier CSV mais sans que ça crée de "doublons". C'est à dire que ne souhaite pas ajouter ce nouveau fichier à l'ancien mais mettre à jour l'ancien catalogue grâce au nouveau et enfin garder les photos correspondantes aux produits. J'espère avoir été à peu près clair Merci d'avance pour votre aide Link to comment Share on other sites More sharing options...
Alexandre Carette Posted October 12, 2015 Share Posted October 12, 2015 Bonjour, Dans l outils d'importation de Prestashop tu selectionnes l'option "forcer les identifiants" ca va te mettre les produit a jour selon la colonne ID. Link to comment Share on other sites More sharing options...
roms95200 Posted October 13, 2015 Author Share Posted October 13, 2015 Bonjour, Dans l outils d'importation de Prestashop tu selectionnes l'option "forcer les identifiants" ca va te mettre les produit a jour selon la colonne ID. Bonjour, Le problème c'est que sur le fichier CSV de mon fournisseur, il n'y a pas d'ID, il y a seulement la référence. Donc quand j'ai importé mon premier fichier CSV, prestashop m'a automatiquement généré des ID. Sachant que l'on peut faire un lien entre l'ID et la référence, y a t-il un moyens d'ajouter rapidement les ID sur mon fichier CSV ? Link to comment Share on other sites More sharing options...
Alexandre Carette Posted October 13, 2015 Share Posted October 13, 2015 et ben tu exportes tout ca avec ce code dans le gestionnaire SQL tu crée une nouvelle requete: 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('http://tonsite.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('http://tonsite.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('http://tonsite.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('http://tonsite.com/img/p/',insert(insert(im.`id_image`,2,0,'/'),4,0,'/'),'/',im.`id_image`,'.jpg') when length(im.`id_image`)=2 then concat('http://tonsite.com/img/p/',insert(im.`id_image`,2,0,'/'),'/',im.`id_image`,'.jpg') when length(im.`id_image`)=1 then concat('http://tonsite.com/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", concat('http://tonsite.com/',pl.`link_rewrite`,'-',p.`id_product`,'.html') as "Produit URL", case when length(im.`id_image`)=6 then concat('http://tonsite.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('http://tonsite.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('http://tonsite.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('http://tonsite.com/img/p/',insert(insert(im.`id_image`,2,0,'/'),4,0,'/'),'/',im.`id_image`,'.jpg') when length(im.`id_image`)=2 then concat('http://tonsite.com/img/p/',insert(im.`id_image`,2,0,'/'),'/',im.`id_image`,'.jpg') when length(im.`id_image`)=1 then concat('http://tonsite.com/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 Tu exportes en csv et une fois que tu a fait tes modifs tu réimportes le tout en forcant les ID. 1 Link to comment Share on other sites More sharing options...
roms95200 Posted October 13, 2015 Author Share Posted October 13, 2015 et ben tu exportes tout ca avec ce code dans le gestionnaire SQL tu crée une nouvelle requete: 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('http://tonsite.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('http://tonsite.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('http://tonsite.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('http://tonsite.com/img/p/',insert(insert(im.`id_image`,2,0,'/'),4,0,'/'),'/',im.`id_image`,'.jpg') when length(im.`id_image`)=2 then concat('http://tonsite.com/img/p/',insert(im.`id_image`,2,0,'/'),'/',im.`id_image`,'.jpg') when length(im.`id_image`)=1 then concat('http://tonsite.com/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", concat('http://tonsite.com/',pl.`link_rewrite`,'-',p.`id_product`,'.html') as "Produit URL", case when length(im.`id_image`)=6 then concat('http://tonsite.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('http://tonsite.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('http://tonsite.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('http://tonsite.com/img/p/',insert(insert(im.`id_image`,2,0,'/'),4,0,'/'),'/',im.`id_image`,'.jpg') when length(im.`id_image`)=2 then concat('http://tonsite.com/img/p/',insert(im.`id_image`,2,0,'/'),'/',im.`id_image`,'.jpg') when length(im.`id_image`)=1 then concat('http://tonsite.com/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 Tu exportes en csv et une fois que tu a fait tes modifs tu réimportes le tout en forcant les ID. Je viens de me rendre compte que je ne peux pas prendre la référence comme ID car sur le catalogue de mon fournisseur, plusieurs produits correspondent à la même référence. Il faudrait donc que j'utilise "Code-barres EAN-13" qui lui est unique Link to comment Share on other sites More sharing options...
Alexandre Carette Posted October 13, 2015 Share Posted October 13, 2015 (edited) Le problème c'est que sur le fichier CSV de mon fournisseur, il n'y a pas d'ID, il y a seulement la référence. Donc quand j'ai importé mon premier fichier CSV, prestashop m'a automatiquement généré des ID. Tu as deux solutions: soit tu recommences du debut en mettant des id dans le fichier de ton fournisseur. Il suffit de crée une colonne ID de mettre 1 et ensuite de dérouler la cellule ca va te generer des id par ordre croissant. Soit tu exportes l'existant de ton catalogue et ensuite tu fait matcher les id avec le catalogue de ton fournisseur. Sinon ultime solution tu met des references et au lieu de forcer les ID tu force les champs avec la reference dans l outils d import de prestashop "utiliser la reference comme clef". Edited October 13, 2015 by Alexandre-KM (see edit history) Link to comment Share on other sites More sharing options...
roms95200 Posted October 13, 2015 Author Share Posted October 13, 2015 Tu as deux solutions: soit tu recommences du debut en mettant des id dans le fichier de ton fournisseur. Il suffit de crée une colonne ID de mettre 1 et ensuite de dérouler la cellule ca va te generer des id par ordre croissant. Soit tu exportes l'existant de ton catalogue et ensuite tu fait matcher les id avec le catalogue de ton fournisseur. Sinon ultime solution tu met des references et au lieu de forcer les ID tu force les champs avec la reference dans l outils d import de prestashop "utiliser la reference comme clef". Je pense que je vais utiliser la deuxième solution car comme je vous l'ai dis dans le catalogue du fournisseur une référence peut comprendre plusieurs produits différents ca peut donc créer des confusions. Mais savez vous comment puis-je exporter mon catalogue ? Link to comment Share on other sites More sharing options...
Alexandre Carette Posted October 13, 2015 Share Posted October 13, 2015 (edited) ben en suivant les instructions que je t ai donné en #4 Edited October 13, 2015 by Alexandre-KM (see edit history) Link to comment Share on other sites More sharing options...
roms95200 Posted October 15, 2015 Author Share Posted October 15, 2015 (edited) et ben tu exportes tout ca avec ce code dans le gestionnaire SQL tu crée une nouvelle requete: 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('http://tonsite.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('http://tonsite.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('http://tonsite.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('http://tonsite.com/img/p/',insert(insert(im.`id_image`,2,0,'/'),4,0,'/'),'/',im.`id_image`,'.jpg') when length(im.`id_image`)=2 then concat('http://tonsite.com/img/p/',insert(im.`id_image`,2,0,'/'),'/',im.`id_image`,'.jpg') when length(im.`id_image`)=1 then concat('http://tonsite.com/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", concat('http://tonsite.com/',pl.`link_rewrite`,'-',p.`id_product`,'.html') as "Produit URL", case when length(im.`id_image`)=6 then concat('http://tonsite.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('http://tonsite.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('http://tonsite.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('http://tonsite.com/img/p/',insert(insert(im.`id_image`,2,0,'/'),4,0,'/'),'/',im.`id_image`,'.jpg') when length(im.`id_image`)=2 then concat('http://tonsite.com/img/p/',insert(im.`id_image`,2,0,'/'),'/',im.`id_image`,'.jpg') when length(im.`id_image`)=1 then concat('http://tonsite.com/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 Tu exportes en csv et une fois que tu a fait tes modifs tu réimportes le tout en forcant les ID. Après execution de la requete j'ai l'erreur suivante : La table "`ps_product`" n'existe pas. J'ai donc regardé mes tables et ce n'est pas "ps_product" mais "pss_product" et idem pour toutes mes autres tables Edited October 15, 2015 by roms95200 (see edit history) Link to comment Share on other sites More sharing options...
roms95200 Posted October 15, 2015 Author Share Posted October 15, 2015 J'ai donc modifier le code comme ceci : 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('http://tonsite.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('http://tonsite.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('http://tonsite.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('http://tonsite.com/img/p/',insert(insert(im.`id_image`,2,0,'/'),4,0,'/'),'/',im.`id_image`,'.jpg') when length(im.`id_image`)=2 then concat('http://tonsite.com/img/p/',insert(im.`id_image`,2,0,'/'),'/',im.`id_image`,'.jpg') when length(im.`id_image`)=1 then concat('http://tonsite.com/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", concat('http://tonsite.com/',pl.`link_rewrite`,'-',p.`id_product`,'.html') as "Produit URL", case when length(im.`id_image`)=6 then concat('http://tonsite.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('http://tonsite.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('http://tonsite.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('http://tonsite.com/img/p/',insert(insert(im.`id_image`,2,0,'/'),4,0,'/'),'/',im.`id_image`,'.jpg') when length(im.`id_image`)=2 then concat('http://tonsite.com/img/p/',insert(im.`id_image`,2,0,'/'),'/',im.`id_image`,'.jpg') when length(im.`id_image`)=1 then concat('http://tonsite.com/img/p/',insert(im.`id_image`,2,0,'/'),im.`id_image`,'.jpg') else '' end as "ImgURL_1" FROM `pss_product` p LEFT JOIN pss_product_lang pl ON (p.id_product = pl.id_product) LEFT JOIN pss_category_product cp ON (p.id_product = cp.id_product) LEFT JOIN pss_category_lang cl ON (cp.id_category = cl.id_category) LEFT JOIN pss_category c ON (cp.id_category = c.id_category) LEFT JOIN `pss_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 `pss_image` i ON (i.`id_product` = p.`id_product`) LEFT JOIN `pss_manufacturer_lang` ml ON (p.id_manufacturer = ml.id_manufacturer) LEFT JOIN `pss_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 `pss_product_shop` sa ON (p.`id_product` = sa.`id_product` AND sa.id_shop = p.id_shop_default) LEFT JOIN `pss_shop` shop ON (shop.id_shop = p.id_shop_default) LEFT JOIN `pss_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 `pss_product_download` pd ON (pd.`id_product` = p.`id_product`) LEFT JOIN `pss_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 Mais j'ai maintenant 2 erreurs : 2 erreurs Lorsque plusieurs tables sont utilisées, chaque attribut doit être référencé à l'une de ces tables. Erreur. Link to comment Share on other sites More sharing options...
Alexandre Carette Posted October 15, 2015 Share Posted October 15, 2015 Après execution de la requete j'ai l'erreur suivante : La table "`ps_product`" n'existe pas. J'ai donc regardé mes tables et ce n'est pas "ps_product" mais "pss_product" et idem pour toutes mes autres tables L'extension par default en bdd de Prestashop est ps_ mais tu peux tout a fait changer cette extension par ce que tu veux lors de l'installation. Link to comment Share on other sites More sharing options...
Alexandre Carette Posted October 15, 2015 Share Posted October 15, 2015 pour le reste ta lang principal est bien pl.id_lang = 1 ? Link to comment Share on other sites More sharing options...
roms95200 Posted October 15, 2015 Author Share Posted October 15, 2015 pour le reste ta lang principal est bien pl.id_lang = 1 ? Euuh comment vérifier ca ? Link to comment Share on other sites More sharing options...
Alexandre Carette Posted October 16, 2015 Share Posted October 16, 2015 (edited) et bien tu va dans ton bo localisation / langue selon les langues installés tu as un ID Edited October 16, 2015 by Alexandre-KM (see edit history) Link to comment Share on other sites More sharing options...
roms95200 Posted October 16, 2015 Author Share Posted October 16, 2015 Oui la seule langue installé est le Français et elle à bien l'ID 1 Link to comment Share on other sites More sharing options...
Alexandre Carette Posted October 16, 2015 Share Posted October 16, 2015 quelle est ta version de prestashop ? Link to comment Share on other sites More sharing options...
roms95200 Posted October 16, 2015 Author Share Posted October 16, 2015 Prestashop 1.6.0.9 Link to comment Share on other sites More sharing options...
Alexandre Carette Posted October 16, 2015 Share Posted October 16, 2015 sans pouvoir faire des tests c un peu difficile comme ca de trouver le bug de la requete, si tu veux je peux essayer de la faire marcher mais il faudrait que j ai un accée a ton bo. Tu peux me mp si tu veux... 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