How can I make the visibility of the "out of stock" label in Webflow dependent on the quantity of all variants, rather than just the default SKU quantity?

Published on
September 22, 2023

To make the visibility of the "out of stock" label in Webflow dependent on the quantity of all variants, you can follow these steps:

  1. Open your Webflow project and navigate to the product page where you want to implement this functionality.

  2. Edit the product template by selecting the appropriate page from the Pages panel.

  3. Select the element that represents the "out of stock" label. This could be a text element or an image with a custom "out of stock" label.

  4. In the settings panel on the right-hand side, locate the Visibility section.

  5. By default, Webflow provides a visibility condition that checks the quantity of the default SKU. To change this and make it depend on the quantity of all variants, click on the "+ Add Conditional Visibility" button.

  6. In the condition dropdown, select "Custom" instead of "Built-in."

  7. Now you need to create a custom condition using Webflow's CMS filters. Click on the "Add Field" button to start creating the condition.

  8. In the "Field" dropdown, navigate to the product's variants and select the quantity field.

  9. Choose the appropriate operator based on your desired condition. For example, if you want the label to be visible when the quantity of all variants is zero or less, select the "is less than or equal to" operator and enter zero.

  10. Click on the "Add Rule" button to finish creating the condition. You can add more rules if needed to create more complex conditions.

  11. Preview your changes to ensure that the "out of stock" label appears or disappears based on the quantity of all variants.

  12. Publish your site to make the changes live.

By following these steps, you can make the visibility of the "out of stock" label in Webflow dependent on the quantity of all variants instead of just the default SKU quantity.

Additional Questions:

  1. How can I customize the design of the "out of stock" label in Webflow?
  2. Is it possible to display the specific variant of a product that is out of stock in Webflow?
  3. Can I send notifications or alerts when a product is out of stock in Webflow?