boulio971 Posted April 30, 2015 Share Posted April 30, 2015 Bonjour, [PS 1.6.0.14] J'ai modifié le contenu de mon fichier ajax-cart.js afin que lorsque l'utilisateur clique sur le bouton "ajouter au panier" 2 produits soient ajoutés au panier : ajaxCart.add(idProduct1, $('#idCombination').val(), true, null, $('#quantity_wanted').val(),null) ;ajaxCart.add(idProduct2, $('#idCombination').val(), true, null, $('#quantity_wanted').val(),null) ; J'ai les résultats suivants : - Parfois cela fonctionne (les 2 produits sont bien ajoutés au panier) - Parfois un seul des 2 produits est ajouté au panier (le 1er ou le 2è aléatoirement) - Parfois j'ai une erreur de type "Impossible to add the product to the cart. textStatus: 'error' errorThrown: 'Internal Server Error' responseText:" généralement accompné d'une erreur 500 :"NetworkError: 500 Internal Server Error - http://localhost/prestashop16014/prestashop/?rand=1430404364908" Je suppose que cela est du à l'enchainement de l'appel de 2 instructions Ajax , mais je ne sais pas comment faire pour que ça fonctionne systématiquement sachant que je souhaite que mes produits soient ajoutés systématiquement dans l'ordre suivant : produit1 puis produit2 Pourriez-vous me renseigner svp ? Merci Link to comment Share on other sites More sharing options...
boulio971 Posted April 30, 2015 Author Share Posted April 30, 2015 résolu 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