WooCommerce – Calculate Aggregate Stock by Category, Attribute, Keyword

Let’s see how to calculate aggregate stock by category, attribute or keyword in WooCommerce.

What is aggregate stock in WooCommerce?

In WooCommerce, aggregate stock is the total quantity of available stock for a specific group of products. For example, you may need to calculate the aggregate stock of a specific category, aggregate stock for a specific product attribute (how many available units you have of yellow t-shirts), etc.

When calculating aggregate stock, you focus on product groups rather than focusing on individual items. So it can be helpful for understanding inventory levels across categories, attributes, or other groupings within your store.

Calculate aggregate stock in WooCommerce

Something important to keep in mind is that WooCommerce itself doesn’t provide a built-in function to directly see aggregate stock levels.

Fortunately, in this tutorial we will show you how to calculate WooCommerce aggregate stock using the WP Sheet Editor plugin.

It allows you to view and manage your WooCommerce products in a spreadsheet format. You can bulk edit thousands of products, run advanced, combined searches using any field as search filter, export and import products using CSV files, etc.

After installing the plugin and activating your license, you can open the products spreadsheet by going to WP Sheet Editor > Edit products. You’ll see a spreadsheet containing all your products’ data.

WooCommerce - Calculate Aggregate Stock by Category, Attribute, Keyword

Calculate aggregated stock for all products

The aggregate stock calculation is done automatically by WP Sheet Editor, depending on what is displayed in the spreadsheet.

For example, we’re displaying all our products, so if you want to see the aggregate stock of all the products in your store, just pay attention to the inventory data displayed above the spreadsheet.

As you can see in the screenshot below, we have 15455 units on our store, which is equivalent to $478,955.00.

WooCommerce - Calculate Aggregate Stock by Category, Attribute, Keyword

Filter product groupings and calculate aggregate stock

Since the aggregated stock is calculated depending on what is displayed in the spreadsheet, you can use the Search tool to filter your products by category, attribute, product type, price range, etc.

woocommerce-check-combined-product-stock

When you filter your products and they are displayed in the spreadsheet, the aggregated stock will be calculated automatically.

Let’s see some examples.

a) Aggregate stock for an entire category

These are the values you need to select in the search tool if you want to calculate the aggregate stock for an entire product category:

  • Enter the category in the “Enter product categories” field.
  • Click on Run search.

Aggregate stock for an entire category

As you can see below, we have filtered our products by category, and the aggregate stock for this category has been calculated automatically.

Aggregate stock for an entire category

b) Aggregate stock by attribute

Do you want to know the aggregate stock of all yellow, small size, Nike brand, or cotton material products? You can easily do it by filtering your products by product attribute.

In this example, we will filter all products with the Yellow color attribute; we just need to select these values in the Search tool:

  • Enter the category in the “Enter product attributes” field.
  • Click on Run search.

Aggregate stock by attribute

As you can see below, we have filtered our products by product color, and the aggregate stock for this group has been calculated automatically.

Aggregate stock by attribute

c) Aggregate stock of all variable products

If you need to know the aggregate stock of all variable products with all their variations, you can filter the products by product type = variable. This will exclude all simple products, external products, etc., and focus the aggregate stock calculation on variable products only.

Just select these values in the search tool:

  • Enter the category in the “Enter product type” field.
  • Click on Run search.

Aggregate stock of all variable products

As you can see below, we have filtered our products by product type = variable, and the aggregate stock for this group has been calculated automatically. The stock column for the main products shows 0 units, but that is because in variable products only the variations need the Stock.

Aggregate stock of all variable products

You can click on Display variations to view the variations next to their parent products.

woocommerce-check-combined-product-stock

d) Aggregate stock by keyword

Do you want to know the aggregate stock of all the T-shirts, all the shoes, all the hoodies you have in your store? You can do it by filtering your products by keyword.

Just select these values in the search tool:

  • Enter the keyword in the “Contains keyword” field.
  • Click on Run search.

Aggregate stock by keyword

We have filtered all products with the “hoddie” keyword and the aggregated stock has been automatically calculated.

Aggregate stock by keyword

e) Aggregate stock by price range

In this example, we will show you how to find products with prices ranging from $10 to $50. Just select these values in the search tool:

  • Tick the Enable advanced filters checkbox.
  • Filter 1:
    • Field: Regular price
    • Operator: >=
    • Value: 10
  • Click on Add new to add another advanced filter.
  • Filter 2:
    • Field: Regular price
    • Operator: <=
    • Value: 50
  • Click on Run search.

Aggregate stock by price range

We have filtered the products by price range, and the aggregate stock has been calculated automatically.

Aggregate stock by price range

This is how you can calculate the aggregate stock in WooCommerce, using the WP Sheet Editor plugin. Since the spreadsheet calculates the global stock using the data displayed in the spreadsheet, you can calculate stock for any product grouping by filtering your products using any field as a search filter.

Do you need help?

You can receive instant help in the live chat during business hours, or you can contact us and we will help you via email.