Managing Out-of-Stock Product Visibility on Your Storefront
When products sell out, you may want to control whether customers can still see them on your storefront. By default, SHOPLINE keeps both out-of-stock products and variants visible, but you can customize this behavior depending on your business needs.
This guide explains how SHOPLINE displays partially and fully sold-out products by default, and introduces the available methods for hiding sold-out variants, removing sold-out products from search and product listings, or automatically delisting products when they run out of stock.
Understanding SPUs and SKUs
Before reviewing the scenarios below, it's helpful to understand the difference between an SPU and a SKU.
- Standard Product Unit (SPU): The main product entry (for example, "T-shirt"). This is the product displayed on your storefront.
- Stock Keeping Unit (SKU): A specific product variant (for example, size S, M, or L).
| Note: Inventory is tracked at the SKU level. |
Default Out-of-Stock Behavior on Your Storefront
By default, SHOPLINE does not automatically hide products or variants when they sell out. Instead, the storefront behavior depends on whether individual SKUs or the entire product are out of stock.
-
Some SKUs are sold out (at least one SKU remains in stock): The SPU remains visible. Sold-out SKUs remain visible on both the product list page and the product page, but cannot be purchased.
-
All SKUs are sold out: The SPU remains visible with a Sold Out badge displayed on the product card. On both the product list page and the product page, all SKUs and the Add to cart button are unavailable.
The sections below explain each scenario in detail and the tools available if you want to change the default behavior.
Scenario 1: Hiding Sold-Out Variants
When only some SKUs are out of stock, the SPU remains visible on your storefront. Sold-out SKUs are displayed as unavailable on both the product page and the product list, allowing customers to see the unavailable options but preventing them from purchasing them.
Hide Sold-Out Variants with the Custom Code App
If you prefer to remove sold-out SKUs from the variant selector instead of keeping them visible, you can use the Custom Code app to add JavaScript that hides sold-out variants on the product page and product list.
For detailed instructions, refer to "Custom Code: Comprehensive Guide."
Scenario 2: Hiding or Delisting Fully Sold-Out Products
When all SKUs of a product are sold out, the product remains visible on your storefront with a Sold Out badge. Customers can still open the product page, but they cannot purchase the product.
Depending on your business needs, you can choose one of the following methods.
Option 1: Hide Sold-Out Products from Search and Product Listings
Use the Smart Search Recommendation app to remove sold-out products from search predictions, search results, and category pages.
- In your SHOPLINE Admin, go to Apps > Smart Search Recommendation.
- Go to Search configurations > Search settings, then click Settings.
-
Under Display settings, set Out-of-stock products to Hide sold-out products, then click Update.
| Note: Customers with a direct link can still access the product page. This setting also applies to scheduled products with no inventory. If Hide sold-out products is selected, scheduled products without stock will not appear in search results after they are published. |
For more information, refer to: "Smart Search Recommendation: Managing Search Configurations."
Option 2: Automatically Delist Products When They Sell Out
Use the Flow Automation app to automatically unpublish a product when its inventory reaches 0. Set a trigger on Product Inventory Change, add a condition for quantity equal to 0, and set the action to Hide product. You can also set up an email notification to alert your team when a product is taken off the shelf.
For detailed instructions, refer to "Flow Automation: Unpublishing Products from Storefront."