Comment ajouter au panier via AJAX Woocommerce
-
-
"Activer lesboutons AJAXpour ajouter aupanier sur la liste desproduits"g.translate"Enable AJAX buttons to add to cart on the product list" g.translate
- 0
- 2012-11-22
- david
-
@david commeje l'ai écrit,j'ai coché lebouton d'activation AJAX,maisilne fait rien.@david as I wrote, I checked the enable AJAX button, but it doesn't do anything.
- 0
- 2012-11-23
- jepser
-
Cen'étaitpas un conseil demon site,je traduisaisjuste votrephraseen espagnol :)This was no advice from my site, I was just translating your Spanish sentence :)
- 0
- 2012-11-23
- david
-
@jepser avez-vous déjàtrouvé la réponse à cette question?Celam'a aussi dérangé.@jepser did you ever find out the answer to this question? Its been bugging me aswell.
- 0
- 2013-01-29
- Lucky Luke
-
Non,j'attendais quelqu'un quim'explique ça ...Nope I have been waiting for someone that explain me this...
- 0
- 2013-01-30
- jepser
-
1 réponses
- votes
-
- 2013-05-27
Parlons-nous de la vueproduit unique ou despages d'archivesproduits (boutique,catégories)?
parce que letexte à côté de la case à cocher/optionindique,grossièrementtraduit:
»activer lebouton ajax-checkout sur lespages d'archivesproduits«
et surtoutes lesinstallationspour lesquellesje l'aifait,c'est ainsi que celafonctionne -extraction ajax sur les archives,maispas sur la vue unique.
ce dernier,vous devez l'implémenter vous-même oupeut-êtretrouver unplugingratuitpour cela.
Suivi:
Unexemple debase sur lafaçon d'utiliser AJAXpour lafonctionnalité »ajouter aupanier« de woocommercepeut êtretrouvéici: Woocommerce - Ajouter unproduit aupanierparprogrammation via JS ou PHP.
are we talking about the single product view or the product archive pages (shop,categories)?
because the text beside the checkbox/option states, roughly translated:
»activate ajax-checkout-button on product archive pages«
and on all the installations i did so for, that is the way its working - ajax checkout on the archives, but not on the single view.
the latter you have to implement yourself or maybe you find a free plugin for that.
Follow up:
A basic example on how to use AJAX for the »add-to-cart«-functionality of woocommerce can be found here: Woocommerce - Add a product to cart programmatically via JS or PHP.
-
C'est correct.L'option d'ajout aupanier ajaxest uniquementpour les archives deproduits.Pourfaire un ajout aupanier via ajax sur lapage deproduit unique,vous devez configurer un événement de clicjQueryet faire l'appel ajax là-bas.This is correct. The ajax add to cart option is only for product archives. To do add-to-cart via ajax on the single product page, you'd need to set up a jQuery click event and do the ajax call there.
- 1
- 2013-08-03
- helgatheviking
Je cherche depuis unmoment,ceci.Je souhaite ajouter un élément via AJAX.Lorsque vous ajoutez un article à unpanier dans Woocommerce,lapage se recharge avec leparamètre GET
add-to-cart="The current product ID"
.Je veux lefaire via AJAX.Dans la zone d'administration setrouve une case à cocherpour activer lafonctionnalitéintitulée "Activer lesboutons AJAX à ajouter aupanier dans la liste deproduits"
Maisilne fait rien,il rechargetoujours lapage.