arrow-left arrow-right brightness-2 chevron-left chevron-right circle-half-full dots-horizontal facebook-box facebook loader magnify menu-down rss-box star twitter-box twitter white-balance-sunny window-close
WooCommerce Product Quantity Dropdown and Default QTY
1 min read

WooCommerce Product Quantity Dropdown and Default QTY

WooCommerce Product Quantity Dropdown and Default QTY

We are currently building a WooCommerce site for a Wine company and needed to have the option to add to cart bottles and cases of wine.

We needed to allow the customer to easily add any amount of product to their cart, but by default we wanted the quantities to show 6 for bottles and 1 for cases. It would be too ambitious to expect customer to buy 6 cases of wine in one go!

Here is our code forked from Gerhard Potgieter’s site. We’ve added the conditional default quantities.

Original: Gerhard Potgieter WooCommerce Quantity Dropdown

[gist https://gist.github.com/raisonon/b978f2ebc4d4e60f28c6 /]

Enjoying these posts? Subscribe for more

Subscribe now
Already have an account? Sign in
You've successfully subscribed to Raison.
Success! Your account is fully activated, you now have access to all content.
Success! Your billing info is updated.