zouhairHajji Posted May 26, 2015 Share Posted May 26, 2015 Bonjour,je suis un développeur des modules prestashop, le problème que je rencontre, c'est que quand j'insere un nouveau produit en sql, j'arrive a le visualiser en backOfficen sauf que je n'arrive pas a l'afficher sur le frontOffice: Voici un exemple de sql : INSERT INTO `ps_product`(`id_product`, `id_supplier`, `id_manufacturer`, `id_category_default`, `id_shop_default`, `id_tax_rules_group`, `on_sale`, `online_only`, `ean13`, `upc`, `ecotax`, `quantity`, `minimal_quantity`, `price`, `wholesale_price`, `unity`, `unit_price_ratio`, `additional_shipping_cost`, `reference`, `supplier_reference`, `location`, `width`, `height`, `depth`, `weight`, `out_of_stock`, `quantity_discount`, `customizable`, `uploadable_files`, `text_fields`, `active`, `redirect_type`, `id_product_redirected`, `available_for_order`, `available_date`, `condition`, `show_price`, `indexed`, `visibility`, `cache_is_pack`, `cache_has_attachments`, `is_virtual`, `cache_default_attribute`, `date_add`, `date_upd`, `advanced_stock_management`, `pack_stock_type`) VALUES ("4042809036602","0","0","2","1","1","0","0","TENSOPLAST HB BD ADH 6CMX2,5M1","","0.000000","0","1","5.7","0.000000","","0.000000","0.00","4042809036602","","","0.000000","0.000000","0.000000","0.000000","2","0","0","0","0","1","404","0","1","0000-00-00","new","1","1","both","0","0","0","0","2013-11-05","2015-05-22","0","3"); INSERT INTO `ps_product_lang` (`id_product`, `id_shop`, `id_lang`, `description`, `description_short`, `link_rewrite`, `meta_description`, `meta_keywords`, `meta_title`, `name`, `available_now`, `available_later`, `custom_field`) VALUES ("4042809036602","1","1","TENSOPLAST HB BD ADH 6CMX2,5M1","TENSOPLAST HB BD ADH 6CMX2,5M1","TENSOPLAST HB BD ADH 6CMX2,5M1","","","","TENSOPLAST HB BD ADH 6CMX2,5M1","","",""); insert into ps_product_shop Values ("4042809036602","1","2","1","0","0","0.000000","1","5.7","0.000000","","0.000000","0.00","0","0","0","1","404","0","1","0000-00-00","new","1","1","both","0","0","2013-11-05","2015-05-22","3"); Merci d'avance Link to comment Share on other sites More sharing options...
coeos.pro Posted May 26, 2015 Share Posted May 26, 2015 bonjour, 1- je vous conseil d'utiliser Db::getInstance()->insert et non pas INSERT INTO (voici les bonnes pratiques : https://www.prestashop.com/blog/fr/les-bonnes-pratiques-de-la-classe-db-sur-prestashop-1-5/ ) 2- id_product = 4042809036602 ? vous avez réellement autant de produits ? id_product est en auto_increment dans cette table. 3- pour vérifier le contenu de vos table je vous conseil mon module gratuit : http://www.coeos.pro/fr/modules-prestashop/41-table-viewer.html 4- vous avez vidé le cache par fichier ? Link to comment Share on other sites More sharing options...
zouhairHajji Posted May 26, 2015 Author Share Posted May 26, 2015 (edited) Bonjour, Le principe ce cette opération ,c'est dimporter les produits juste a partir sql, je suis obligé de passé que par SQL, :/ je ne dois pas passer par php Edited May 26, 2015 by zouhairHajji (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