Remove "Add to Cart" badge from sold out products (Venue theme)

gmm314
Visitor
2 0 0

I'm trying to remove the "Add to Cart" badge/button so it doesn't show up on any sold out products on any Collections page. I've tried a few of the suggestions listed on here but none seem to work for my theme. Any help would be appreciated.

 

Theme: Venue

Site: melier.com  (example https://melier.com/collections/adversity-cellars)

Replies 3 (3)
romartiny
Shopify Partner
34 8 8

You need to find the button by class "quick-shop__trigger" and wrap it in the desired liquid code.

{% if product.available %}
  <button class="quick-shop__trigger"></button>
{% endif %}
Romartiny | Software Engineer | Shopify
Was my reply helpful? Click Like to let me know!
Was your question answered? Mark it as an Accepted Solution
gmm314
Visitor
2 0 0

Thank you. This hid the icon, but I only want it to be hidden when a product is sold out. Any idea how to make that adjustment?

Here's what I wrapped in comment/endcomment to disable.

{% if quick_shop_trigger == 'icon' %}
<button class="quick-shop__trigger js-quickshop-trigger" aria-hidden="true" tabindex="-1">
{% render 'icon-quickbuy' %}
</button>
{% endif %}

romartiny
Shopify Partner
34 8 8

You mean this?

{% if quick_shop_trigger == 'icon' and product.available %} <button class="quick-shop__trigger js-quickshop-trigger" aria-hidden="true" tabindex="-1"> {% render 'icon-quickbuy' %} </button> {% endif %}
Romartiny | Software Engineer | Shopify
Was my reply helpful? Click Like to let me know!
Was your question answered? Mark it as an Accepted Solution