Create an archive listing 'Sold Out' products in WooCommerce

WooCommerce Previously Sold Products Archive

Some e-commerce websites sell the same products to multiple customers, while others sell one-of-a-kind products that can only be bought by one customer. If you're in the second category, then what happens after a product has been purchased and is no longer available?

There are lots of products that can only be sold once. It could be anything unique, ranging from used products such as cars or designer handbags; to original handmade products such as art or jewellery.

Read this article if you sell one-off products and want to learn how to:

  • Remove each product from sale once it has been bought - this prevents accidents and automates your stock control.
  • Create an archive of sold out products in your WooCommerce store - this can boost your search engine position by adding extra keyword-rich content to your site, as well as your credibility by showing all the amazing products you have sold in the past.

How to prevent products from being purchased more than once

It's surprisingly easy to set up your WooCommerce store so that each product can only be bought once:

  1. WooCommerce settings:
    1. Go to WooCommerce → Settings → Products→ Inventory.
    2. Tick 'Enable Stock Management'.
    3. Disable the low and out of stock notification emails, as if you sell one-time-only products then you don't need to know when something goes out of stock.
    4. Do NOT enable the 'Hide out of stock items from the catalog' option.
    5. Save the page.
  2. Product settings:
    1. Go to the 'Edit Product' screen for each product.
    2. Scroll down to the 'Product Data' section and open the 'Inventory' tab.
    3. Tick 'Manage Stock' and set the stock quantity to 1. Do not allow back orders.
    4. Save the product.

Once you have done this, each product can only be purchased once. The product page will show an 'Add to cart' button with no quantity picker because only one is in stock. After a customer has bought the product, the add to cart button will disappear and no one else will be able to buy it.

How to list previously sold products in WooCommerce

WooCommerce archive sold out products

Most stores selling one-off products want to list the available products in their main shop, and the sold out products on a separate archive page. I'll tell you how to do both of these things next.

You'll need the WooCommerce Product Table plugin for both of these. It comes with shortcodes that you can use to list products separately, based on their stock status:

Install WooCommerce Product Table, activate your license key, and go through the plugin settings page to choose how you'd like to list your products. For example, you can choose which columns of information to display about each product.

List available products

Once you've installed WooCommerce Product Table, add the following shortcode to the page where you want to list your current inventory:

[product_table cf="_stock_status:instock"]

If you want to list products from each category separately, then you can do this by adding the category to the shortcode like this:

[product_table cf="_stock_status:instock" category="category-slug"]

Add as many shortcodes as you like, each listing different products.

Create a sold out products archive in WooCommerce

WooCommerce Product Table Gutenberg shortcode
It's as easy as adding shortcodes to a page in WordPress!

Next, it's time to create an archive of sold out products. These are the products which you have previously sold but are no longer available.

To do this, simply add the following shortcode wherever you want to list sold out products. This might be underneath your current inventory (as in the above screenshot), or it might be on a separate archive page:

[product_table term="product_visibility:outofstock"]

Again, you can use the category option to list sold out products by category:

[product_table term="product_visibility:outofstock" category="category-slug"]

Troubleshooting tip: If no products are listed, go to WooCommerce → Settings → Products → Inventory and make sure your store isn't set to hide out of stock products.

Choosing your table columns

The sold out products will be listed in a table, with whichever columns you set on the plugin settings page. By default, this will include an add to cart column, which was perfect when you listed your current products in the main shop. However, that may not be appropriate now you're listing sold out products. After all, the products are no longer available - so you don't want to include an add to cart button!

At this point, your table won't look broken because WooCommerce Product Table cleverly transforms the 'Add to Cart' button into a 'Read More' button for sold out products. The button links to the single product page, where people can see more images and learn more about the previously sold product.

If you don't want to include a 'Buy' column for your sold out products, then you can easily remove it from the table like this:

[product_table term="product_visibility:outofstock" columns="image,name,summary,price"]

This will add columns for the sold out product image, name, short description and price. Use the documentation to choose exactly which columns you require.

Where to get the plugin

As you can see, WooCommerce Product Table makes it super-simple to list your previously available 'sold out' products separately from your main shop. If you sell one-of-a-kind products that are different each time, this is a great way to show customers what to expect from your store, even if they want isn't available right now.

Test the plugin risk-free today - it only takes a few minutes to set up!

Please share your thoughts...

Your email address will not be published. Required fields are marked *