Woocommerce - prevent items with quantity of 0 being added to cart

Hi, I have item quantities on the shop page next to each item. The user can enter their quantity and click the add to cart button, which will add the item to the cart using ajax. By default I have the item quantity set to 0; however if the user clicks the add to cart button when the quantity is 0, the item will be added to the cart with a quantity of 1.

What I want to happen is if the item quantity is 0 then a message will appear telling the user to enter their quantity and the item will not be added to the cart.

Is this possible? Any help would be appreciated.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.