Adding quantity selectors / quantity inputs to the product table
How to show a quantity picker in the product table
By default, the Add to Cart column appears in the table without a quantity selector. You can change this by ticking the Quantities box on the plugin settings page, or by setting the
show_quantity option to
true in the product table shortcode. This will display a quantity box next to the Add to Cart button. You can also set this option to
false to hide the quantity selector.
[product_table columns="name,price,add-to-cart" show_quantity="true"]
If the quantity selector or up/down arrows aren’t working, please read our article about quantity selector problems.
Can I set quantity increments or a maximum or minimum quantity of products that can be purchased?
Yes! WooCommerce Product Table works beautifully with the official Min/Max Quantities plugin, plus and WooCommerce Max Quantity and Quantities and Units for WooCommerce plugins. Please see our announcement articles for more information about how the two plugins work together:
Can I change the default quantity to zero?
The default quantity in WooCommerce is 1, and this is inherited by WooCommerce Product Table.
You can change the default quantity to anything you like – including 0 – by using WooCommerce Product Table with our other plugin, WooCommerce Default Quantity. This allows you to change the default quantity either globally, for whole categories, or for individual products.
Once you have changed the default starting quantity, this will appear in the quantity picker within the product table. It will also appear anywhere else that shows a quantity picker, such as on the single product page, or in the quick view lightbox (if you are using WooCommerce Product Table with our Quick View Pro plugin).
How to sell by weight
Lots of people use WooCommerce Product Table to sell products by weight. For example, if they are selling food products by the kilogram.
The easiest way to sell by weight is to rename the price column to ‘Price (per kg)’ (or whatever weight measure you are selling in).
The customer will see the price per kg in the ‘price’ column of the product table and use the quantity picker in the add to cart column to select how many kilograms they wish to order. They can then add to their cart and pay in the usual way.
How to add decimal step values
If you want people to be able to order in decimal step values (e.g . fractions of a kilogram, such as 1.5kg) then there are two ways to do this:
- Install the free Product Quantity Control for WooCommerce plugin that lets people order in step values such as 1.25.
- Alternatively, you can simply set your prices in smaller measures. For example, if you want customers to be able to order 1.5kg then you could add your product prices per gram instead of per kilogram. The customer would then select a quantity of 1,500 to order 1.5kg. That way, you don’t need to provide a way to order decimal quantities.