How to remove/replace the SOLD OUT-button with the Back in Stock-button on collection page

Hello all,

I would really appreciate some help here, does anyone know how to solve the following?

We have installed the Back in stock app and to show the “notify me”-link on the collection page we need to add the following snippet:

{% unless product.available %}  Notify when available  {% endunless %}

Result:

Now, instead of showing the link below the Sold Out-button, we’d like to change the Sold Out-button to a Notify Me-button. Or another solution might be to remove the Sold out-button and customize the “notify me”-link so it look similar to the current button. I’m new to Liquid but familiar with CSS and HTML.

This is the code for the button in the collection page template:

{% capture cart_icon_name %}{{ settings.cart_icon | default: 'icon-custom-theme-327' }}{% endcapture %}
<{% if settings.buttons_animation_icon_enable %}a href="{{ url }}"{% else %}button type="submit"{% endif %} class="addtocart btn{% if button_colorize == 2 %} btn--secondary{% endif %} btn--status{% if settings.buttons_animation_icon_enable %} btn--animated{% endif %}{% if settings.cart_ajax and enable_select_options_button != true %} js-product-button-add-to-cart{% endif %}" name="add" data-js-product-button-add-to-cart{% unless current_variant.available %} disabled="disabled" data-button-status="sold-out"{% elsif variant_pre_order %} data-button-status="pre-order"{% else %}{% if enable_select_variant_button %} data-button-status="select"{% if button_select_disable %} data-button-select-disable{% endif %}{% endif %}{% endunless %}>
    {%- if enable_select_options_button -%}
        *{% include cart_icon_name %}*{{ 'products.product.add_to_cart.select_options' | t }}
        *{% include cart_icon_name %}*{{ 'products.product.add_to_cart.select_options_mobile' | t }}
    {%- else -%}
        *{% include cart_icon_name %}*{{ 'products.product.add_to_cart.title' | t }}
        *{% render 'icon-custom-theme-328' %}*{{ 'products.product.add_to_cart.added' | t }}
        {%- if enable_select_variant_button -%}
            *{% include cart_icon_name %}*{{ 'products.product.add_to_cart.select_options' | t }}
            *{% include cart_icon_name %}*{{ 'products.product.add_to_cart.select_options_mobile' | t }}
        {%- endif -%}
    {%- endif -%}
    {{ 'products.product.add_to_cart.sold_out' | t }}
    *{% include cart_icon_name %}*{{ 'products.product.add_to_cart.pre_order' | t }}

{%- assign enable_select_options_button = false -%}
{%- assign enable_select_variant_button = false -%}

@nadiaa

Sorry you are facing this issue, it would be my pleasure to help you.

Welcome to the Shopify community! :blush:
Thanks for your good question.

Please share your site URL,
I will check out the issue and provide you a solution here.

Hi KetanKumar,

Thank you! www.delmesaliquor.com is the site.