ColonelMoutarde Posted May 10, 2017 Share Posted May 10, 2017 (edited) Salut, J'ai ce message quand je lance l'update manuel pour les panier abandonné sur le module "relancez vos clients". Fatal error: Uncaught Duplicate entry '6-1' for key 'PRIMARY'<br /><br /><pre>INSERT INTO `cart_rule_lang` (`id_cart_rule`, `name`, `id_lang`) VALUES ('6', 'Bon de réduction pour votre panier abandonné', '1')</pre> thrown in /shop/classes/db/Db.php on line 791 Pouvez vous m'aider ? Edited May 10, 2017 by ColonelMoutarde (see edit history) Link to comment Share on other sites More sharing options...
doekia Posted May 10, 2017 Share Posted May 10, 2017 Tu as été bidouiller à l'explosif ta base de données il semble. - bravo En gros tu as truncate ps_cart_rule mais pas ps_cart_rule_lang Link to comment Share on other sites More sharing options...
ColonelMoutarde Posted May 10, 2017 Author Share Posted May 10, 2017 Salut Doekia, La table existe bien et elle as quelques entrée, peux tu m'envoyer le script sql de création de ta table ? Link to comment Share on other sites More sharing options...
ColonelMoutarde Posted May 10, 2017 Author Share Posted May 10, 2017 elle a bien une entrée avec la clée 1 et une autre la clé 6 : si je fait un export, voici ce que j'obtiens : INSERT INTO `cart_rule_lang` (`id_cart_rule`, `id_lang`, `name`) VALUES (1, 1, 'Transporteur gratuit'), (2, 1, 'Récompense fidélité'), (3, 1, 'Transporteur gratuit'), (4, 1, 'Transporteur gratuit'), (5, 1, 'Transporteur gratuit'), (6, 1, 'Transporteur gratuit'), (7, 1, 'Transporteur gratuit'), (8, 1, 'Transporteur gratuit'); Link to comment Share on other sites More sharing options...
ColonelMoutarde Posted May 10, 2017 Author Share Posted May 10, 2017 Je suis en 1.6.1.7 Link to comment Share on other sites More sharing options...
doekia Posted May 10, 2017 Share Posted May 10, 2017 (edited) et que contient cart_rule ? Edited May 10, 2017 by doekia (see edit history) Link to comment Share on other sites More sharing options...
ColonelMoutarde Posted May 10, 2017 Author Share Posted May 10, 2017 voila : INSERT INTO `cart_rule` (`id_cart_rule`, `id_customer`, `date_from`, `date_to`, `description`, `quantity`, `quantity_per_user`, `priority`, `partial_use`, `code`, `minimum_amount`, `minimum_amount_tax`, `minimum_amount_currency`, `minimum_amount_shipping`, `country_restriction`, `carrier_restriction`, `group_restriction`, `cart_rule_restriction`, `product_restriction`, `shop_restriction`, `free_shipping`, `reduction_percent`, `reduction_amount`, `reduction_tax`, `reduction_currency`, `reduction_product`, `gift_product`, `gift_product_attribute`, `highlight`, `active`, `date_add`, `date_upd`) VALUES (1, 307, '2016-11-03 15:33:58', '2016-11-13 15:33:58', NULL, 1, 1, 1, 1, 'BO_ORDER_1985', 0.00, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0.00, 0.00, 0, 1, 0, 0, 0, 0, 1, '2016-11-03 15:33:58', '2016-11-03 15:33:58'), (2, 242, '2017-02-21 14:08:10', '2018-02-21 14:08:10', '', 0, 1, 1, 1, 'FID62921', 0.00, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0.00, 3.60, 0, 1, 0, 0, 0, 1, 1, '2017-04-02 20:53:09', '2017-04-02 21:13:35'), (3, 15464, '2017-05-10 11:40:03', '2017-05-11 00:00:00', '', 1, 1, 1, 1, 'FLW-1-EJF6JQQ0YO', 0.00, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 3.00, 0.00, 0, 1, 0, 0, 0, 0, 1, '2017-05-10 11:40:03', '2017-05-10 11:40:03'), (4, 15464, '2017-05-10 11:40:58', '2017-05-11 00:00:00', '', 1, 1, 1, 1, 'FLW-1-UXDNVWI9AG', 0.00, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 3.00, 0.00, 0, 1, 0, 0, 0, 0, 1, '2017-05-10 11:40:58', '2017-05-10 11:40:58'), (5, 15464, '2017-05-10 11:46:29', '2017-05-11 00:00:00', '', 1, 1, 1, 1, 'FLW-1-FR2P3HJQSV', 0.00, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 3.00, 0.00, 0, 1, 0, 0, 0, 0, 1, '2017-05-10 11:46:29', '2017-05-10 11:46:29'), (6, 15464, '2017-05-10 11:59:16', '2017-05-11 00:00:00', '', 1, 1, 1, 1, 'FLW-1-RGQBVN41WX', 0.00, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 3.00, 0.00, 0, 1, 0, 0, 0, 0, 1, '2017-05-10 11:59:16', '2017-05-10 11:59:16'); Link to comment Share on other sites More sharing options...
Ryan Hidri Posted May 10, 2017 Share Posted May 10, 2017 tu essayes de faire entrer des données manuellement ? si je comprends bien ya des données exitantes ayant les memes cles peux tu nous donner plus de details sur le pb que tu rencontres ? Link to comment Share on other sites More sharing options...
ColonelMoutarde Posted May 10, 2017 Author Share Posted May 10, 2017 Salut Hidri, Je ne veux pas renter les données manuellement, j'utilise pour cela l'url gérée dans la module "relancez vos clients" comme ceci : http://www.natural-physical-attitude.com/shop/modules/followup/cron.php?secure_key=xxxxxxxxxxxxxxxxxxxxxx Pour faire un test et c'est là que j'ai le message d'erreur : Fatal error: Uncaught Duplicate entry '6-1' for key 'PRIMARY'<br /><br /><pre>INSERT INTO `cart_rule_lang` (`id_cart_rule`, `name`, `id_lang`) VALUES ('6', 'Bon de réduction pour votre panier abandonné', '1')</pre> thrown in /shop/classes/db/Db.php on line 791 Link to comment Share on other sites More sharing options...
doekia Posted May 10, 2017 Share Posted May 10, 2017 Très exactement ce que je disais tu as été bricollé dans ta base de données sans savoir ce que tu faisais.Tu as supprimé des entrées dans la table cart_rule sans supprimer l'équivalent de la table cart_rule_lang delete cl.* from cart_rule_lang cl left join cart_rule c on c.id_cart_rule = cl.id_cart_rule where c.id_cart_rule is null; A l'avenir avant d'aller bricoler essaie de comprendre ce que tu fais Link to comment Share on other sites More sharing options...
ColonelMoutarde Posted May 10, 2017 Author Share Posted May 10, 2017 Merci doekia, je pense que cela fonctionne. Merci beaucoup pour le temps consacré. 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