Clément Coron Posted January 24, 2018 Share Posted January 24, 2018 Bonjour, Depuis quelques jours j'ai une erreur qui est apparu lorsque je fait un nouveau produit et les associations ne sont pas sauvgardées. Quel pourrait-être la cause de cela ? Merci à vous. Voici le message d'erreur : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ON DUPLICATE KEY UPDATE id_product=2203,taric=' at line 1 INSERT INTO ps_vm_taric (id_product,taric) VALUES (2203,) ON DUPLICATE KEY UPDATE id_product=2203,taric= Link to comment Share on other sites More sharing options...
Eolia Posted January 24, 2018 Share Posted January 24, 2018 oui il manque la fin, donc sans doute un caractère non-échappé qui fait tout planter. Cette requête n'est pas native Prestashop donc voir dans vos modules instllés qui doit s'appeler vm_taric quelque chose et regarder son code dans le hook productUpdate Link to comment Share on other sites More sharing options...
Clément Coron Posted January 24, 2018 Author Share Posted January 24, 2018 Super merci, problème résolu. Un module récemment installé était présent dans le hook productupdate, j'ai donc supprimé l'accroche et tout fonctionne correctement maintenant. Link to comment Share on other sites More sharing options...
doekia Posted January 24, 2018 Share Posted January 24, 2018 oui mais le module est tout de même boiteux donc remonter le problème au développeur de ce dernier. Ceci est peut-être l'arbre qui cache la forêt. Link to comment Share on other sites More sharing options...
Eolia Posted January 24, 2018 Share Posted January 24, 2018 Surtout que s'il était hooké là, c'est qu'il avait une action à faire qui, dans tous les cas, ne se fera plus^^ Link to comment Share on other sites More sharing options...
Guest Posted October 31, 2018 Share Posted October 31, 2018 je viens d'avoir la même, ça vient d'un module vendu chez Jeckyl : Presta2expinet qui gère les codes "taric" pour la douane, il faut modifier le fichier presta2expinet.php en rajoutant un test pour voir si la variable est vide. à partir de la ligne 519 pour la fonction suivante : public function hookActionProductUpdate($params) { $id_product = Tools::getValue('id_product'); $taric = pSQL(Tools::getValue("taric")); if (isset($taric) && $taric != '') { $sql = 'INSERT INTO '. _DB_PREFIX_ .'vm_taric (id_product,taric) VALUES ('.(int)$id_product.','.$taric.') ON DUPLICATE KEY UPDATE id_product='.(int)$id_product. ',taric='.$taric.''; Db::getInstance()->execute($sql); } } voilà.. Link to comment Share on other sites More sharing options...
doekia Posted October 31, 2018 Share Posted October 31, 2018 Ou mieux: https://www.prestashop.com/forums/topic/834463-module-laposte_integral-pour-coliship/ 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