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.
[gist https://gist.github.com/raisonon/b978f2ebc4d4e60f28c6 /]
Enjoying these posts? Subscribe for moreSubscribe now
Already have an account? Sign in