How to include a waiting list option for your sold out items.

See the result here

Here are two methods: one using snippets and the other using a custom block, both are very similar.

Method 1:

  • Create a new snippet called waiting-list.liquid in the Snippets folder.

  • Add the following code:

{% assign out_of_stock = false %}
{% for variant in product.variants %}
  {% if variant.available == false %}
    {% assign out_of_stock = true %}
  {% endif %}
{% endfor %}

{% if out_of_stock == true %}

  {% form 'contact' %}
    {% if form.posted_successfully? %}
    <p> Thanks! We will notify you when your item is available.</p>
    {% else %}
    <a class="product-popup-modal__button link" id="notify-me">Item out of stock?</a>
    {% endif %}
    {% unless form.posted_successfully? %}
    <div id="wrapper" class="hide" >
    	<div class="waiting-wrapper">
          <input autofocus
                 value="{{ }}"
                 type="email" aria-label="Enter email"
                 placeholder=" Please enter a valid email address"
          <input aria-label="Size"
                 placeholder="Enter out of stock item">
          <input type="hidden"
                 value="Please notify me when {{ product.title | escape }} becomes available." />
        {{ }}
          <div style="margin-top: 1em">
            <button class="button" type="submit">Join Waiting List</button>
    {% endunless %}
  {% endform %}
{% endif %}

var ready = (callback) => {
  if (document.readyState != "loading") callback();
  else document.addEventListener("DOMContentLoaded", callback);
ready(() => {
     document.querySelector("#notify-me").addEventListener("click", () => {

.hide {
  display: none;
.waiting-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1em;
.grecaptcha-badge {
  visibility: hidden;

  • Open the main-product.liquid section file.

  • Add {% render 'waiting-list' %} to the code. I added it after the “Share” button, like this:

<script src="{{ 'share.js' | asset_url }}" defer="defer"></script>

{% render 'waiting-list' %}

Now, when a product has an unavailable variant, an Item out of stock? link should appear on the product page just below the share button.

Method 2:

  • In the theme Customizer, navigate to a product page.

  • Under Product information, click on Add block and select Custom liquid.

  • Paste the same code as above for the Snippet into the Custom liquid text field, and save.

  • Now the block is included in the product information area of the page and its position can be moved as required.

For both methods, an email will be sent to your Shopify address when a user enters their details and clicks the Join Waiting List button.