Swapping Add to Cart button text if tagged with 'waitlist'

Solved
New Member
22 0 0

Hi there, I am trying to change some add to cart button logic to display the word "waitlist" instead of sold out if the product is tagged with waitlist. Here is my code: 

<button
        class="add-to-cart caps futura"
        type="submit"
        name="add"
        data-add-to-cart
        {% unless current_variant.available %}disabled="disabled"{% endunless %}>
          <span data-add-to-cart-text>
            {% if current_variant.available %}
Add To Cart
{% elsif product.tag contains 'waitlist' %}
Waitlist
{% else %}
Sold Out
{% endif %} </span> </button>

 

I feel like there is some glaring mistake that I'm making. Help would be greatly appreciated.

 

Thanks!

0 Likes
Highlighted

Success.

Globetrotter
626 59 126

Just missing an "s". Use product.tags, not tag

If you'd like to make any edits to your store, please send me a direct message and we can discuss what you'd like to accomplish :D
0 Likes