Jump to content

Comment envoyer des infos personnalisées au panier svp ? Merci


CyBeRCeD

Recommended Posts

Bonjour à tous. Je me permet de venir poster ce matin car je galère un peu concernant l'ajout d'un produit contenu dans un nouveau module que je viens de développer.

En effet, tout d'abord, j'ai un bouton qui à l'origine est une simple image, j'aimerai lui assigner la même fonction que le bouton ajouter au panier d'origine. Je lui ai assigné un id="add_to_cart" ainsi qu'une class="buttons_bottom_block" mais sans succès.

Ensuite, j'ai recherché la fonction ajax permettant d'ajouter certaines infos au panier et donc à la commande à partir du clic sur ce bouton. J'imagine que c'est cela :

$('.ajax_add_to_cart_button').unbind('click').click(function(){
           var idProduct =  $(this).attr('rel').replace('ajax_id_product_', '');
           ajaxCart.add(idProduct, null, false, this);
           return false;
       });
       //for product page 'add' button...
       $('body#product p#add_to_cart input').unbind('click').click(function(){
           ajaxCart.add( $('#product_page_product_id').val(), $('#idCombination').val(), true, null, $('#quantity_wanted').val(), null);
           return false;
       });



Le problème c'est que j'ai beau rechercher dans les fichiers, je ne trouve aucun éléments ayant pour id "product_page_product_id" donc je n'arrive pas à savoir ce qui est exactement transmis et comment tout cela fonctionne.

Si une âme généreuse passe par là, pour me fournir quelques explications, je lui serai grandement reconnaissant.

Merci d'avance

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...