Our Biggest Sale Is Here
Up to 70% Off
Get the Deal

How to create a WooCommerce product table in wpDataTables

Say you sell 200 kinds of screws and bolts in your WooCommerce store, and your trade customers want to order 50 of one and 100 of another without opening each product page. A WooCommerce product table lists your products with their price and stock, lets customers search and filter them, and adds them to the cart straight from the table, several at once if they like.

WooCommerce tables are included in the Pro and Developer licences. They aren’t available in the Starter and Standard licences.

What can a WooCommerce product table do?

A WooCommerce table reads your products from WooCommerce on every page load and lets customers buy from it. It can:

  • list products by category, tag, price, stock or other parameters, and show new or changed products automatically,
  • add a product to the cart with an Add to cart button and a Quantity field, without leaving the page,
  • add several selected products to the cart at once with the Select column,
  • show the number of items in the cart and their total above the table.

How do I create a WooCommerce table?

Go to wpDataTables → Create a Table, click Build a WooCommerce Table, choose the products in the tabs, check the preview and create the table.

  1. Start the builder. Go to wpDataTables → Create a Table and click Build a WooCommerce Table.
  2. Choose the products. Set the parameters in the tabs, for example Product Category or Stock status in the Product tab, or a price range in Prices. Leave them empty to show all products.
  3. Watch the preview. Query results preview below the tabs updates as soon as you change a field.
  4. Create the table. Click Next. Check the rows in Preview the 5 first result rows, then click Create the table.
The WooCommerce table wizard with the Product tab open, Stock status set to In stock and the Query results preview of the products
Choosing WooCommerce products, shown as overlapping panels: (1) the Product tab, (2) Stock status, (3) Query results preview.

Video: creating a WooCommerce product table and adding a product to the cart.

The parameters are grouped in these tabs:

Tab Parameters
General Product status, Product type, Include, Exclude, Order by, Order, Author ID
Product Product Tag, Product Category, SKU, Total sales, Stock quantity, Stock status, Back orders, Visibility, Average rating, Review count
Linked Products Up-sells, Down-sells, Parent ID, Exclude Parent ID
Prices Price, Regular Price, Sale Price
Measurements Width, Length, Weight, Height
Custom Fields Product custom fields, such as a brand or material, added as columns

Which columns does the table have?

The table gets these columns: Select, Product ID, Product Name, SKU, Price, Stock Status, Total Sales, Categories, Tags, Dimensions, Average Rating, Review Count, Featured Image, Date Published, Short Description and Add to Cart. You can’t choose them while creating the table, so hide the ones you don’t need afterwards, the same way as in any other table.

The Price column shows the regular price, or the old price crossed out next to the sale price for products on sale. For variable products with different prices, it shows the price range.

How do customers buy from the table?

Customers add products to the cart with the Add to Cart column, or select several rows and add them at once. The two special columns work like this:

  • Add to Cart. Each row has a Quantity field and an Add to cart button that adds the product without leaving the page. For variable products, dropdowns for the variations, such as size or color, come first, and the button stays disabled until a variation is chosen.
  • Select. Each row has a checkbox, and the header checkbox selects all rows. Selected rows are highlighted, and the Add to cart button above the table adds all of them.
A WooCommerce product table on a WordPress page with the Add to cart button above the table, the cart total, two selected rows and a row with quantity 2
A product table on the front end, shown as overlapping panels: (1) Add to cart for the selected rows, (2) View cart and the cart total, (3) the Select boxes, (4) the quantity of a row, (5) Add to cart for one row.

Above the table, customers see the number of items in their cart and the total amount, for example 2 items – 800 рсд, and a View cart link that opens the WooCommerce cart. After a product is added, a cart icon with the quantity appears below its button. If a customer asks for more than the stock, a notice says the product is unavailable.

How do I show product custom fields?

Open the Custom Fields tab, click Add New Custom Field Column, and enter a column header and the field name. For example, for the fields brand and material created with Advanced Custom Fields for the Product post type:

  1. Open the tab. In the table’s settings, open the Custom Fields tab.
  2. Add a column. Click + Add New Custom Field Column.
  3. Name it. In Column Header, type the header customers will see, for example Brand.
  4. Enter the field. In Custom Field, type the field name, for example brand.

Use the field name, also called the meta key, not its label. The label only shows on the product edit screen, and wpDataTables finds the field by its name.

What are the limitations of WooCommerce tables?

WooCommerce tables have a few limits compared to other tables:

  • The Excel-like editor isn’t available, because the Select and Add to Cart columns don’t work in it.
  • Customers can’t remove products from the cart in the table, only in the WooCommerce cart.
  • The Select and Add to Cart columns can’t be sorted, filtered or edited.

What should I remember about WooCommerce tables?

Click Build a WooCommerce Table with a Pro or Developer licence, choose the products in the tabs and create the table. Customers buy from it with the Add to Cart and Select columns, and you add product custom fields by their field name in the Custom Fields tab.

Wait, Before You Download!

To get your hands on wpDataTables Lite, please enter your email address below. We’ll send you a direct download link and keep you updated on existing features along with helpful tips and tricks!

By continuing, I accept Privacy Policy and T&C
Mail Box