Jump to content

Fonction ajaxCart.add() du panier ajax buggue si éxécutée à la soumission d'un formulaire.


Recommended Posts

Bonjour,

 

Je veux ajouter un produit à mon panier en ajax lors de la soumission d'un fomulaire comme ci :

$("#monform").submit(function(){

ajaxCart.add(id, null, null, '#monbouton' ,1,null);

});

Cependant lorsque j'essaie je reçois une belle alerte :

 

Impossible to add the product to the cart.

 

J'ai regardé sur internet et les bugs liés au panier Ajax semblent récurrents sur Prestashop.

 

Lorsque j'éxécute la fonction hors de ma fonction jquery .submit() je n'ai pas de soucis l'ajout au panier se fait bien.

 

 

Comment pouvez-vous expliquer ce bug ?

 

Merci d'avance.

Edited by guizmo83 (see edit history)
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...