Mohamed Haidar Mohamed Haidar -4 years ago 298
Javascript Question

WooCommerce Shop page: Quantity input on add to cart button

I'm using the Divi theme with WooCommerce plugin. In shop page, I would like to have the quantities adjustments directly on add to cart button .

My web site

Presently you have to click on the product to go in to single product page and only then is it possible to add to cart.

I have tried to figure out what produces the list of products so that I can modify it, but as you probably guessed I'm very new to this.

How can I add that functionality the to shop page products?

Answer Source

So what I ended up doing was adding the single page add to cart action to a hook for the shop page loop as follows:

           'woocommerce_template_single_add_to_cart', 30);


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download