Shopify - Hide sold out variants

Risorsa 1
Raj KumarAugust 28, 2022

That one thing, no merchant wants is to irritate their customers and lose them for good, just because options/variants of some products are sold out but still visible on product pages by default. The customer gets to know if the variant option is sold out or in stock only after they click on the product variant that they would like to purchase.

Though this problem is relevant but there is no native solution provided by Shopify.

Possible soltions

  • An app (Camouflage: Hide sold variants)
  • A guide provided by Shopify (Works for free old themes and 1 product option only)
  • Use a theme that might have this feature built in
  • Contact a developer

Camouflage: Hide sold variants

This is the easiest way to hide/disable/strike-through variants (sold out or unavailable or any variant). All you need to do is follow a few simple steps:

  1. Install the app
  2. In the app dashboard, select/search your theme name [Important]
  3. Select the variant picker that you are using in your product pages (Dropdowns or Buttons). This step help Camouflage target variants on your product pages.
  4. Select the action you want to perform on sold out or unavailable variants
  5. Click "Save" button.

Now, you need to activate the app in one of your themes

If you want to activate it on your live theme, you can click on the green "Enable Camouflage" button and the click on the "Save" button at the top right corner

Enable Camouflage

Shopify's guide to hide sold out variants

If you have a vintage Shopify free theme like Debut or Brooklyn, and have only 1 product option (eg: only color options or only size options) you can check this Shopify guide.

You will need to copy paste the code. So, its recommended that you duplicate your theme in case anything goes wrong.

Select your theme from the guide and copy the javascript code provided. Paste the code at the bottom of theme.js or theme.js.liquid file

Save the the file and check the theme if it works.

Use a theme that has hiding variants as a built in feature

There are a several paid themes like Impulse that comes with strike-through feature for sold out or unavailable variants but they don't hide variants. You can visit the theme store and check the theme you like

Contact a developer

If nothing above works or you want a custom solution for this problem, sometimes it is best to ask a developer to build you a custom tailored soltion.

Advantage: You get a very minimal code that works and this results in almost 0 extra load time of the website

Distadvantage: Initially it might contain some bugs and can cause your customers difficulties in purchasing products