Discover the art of living with vibrant, eclectic home accents
/
Our shop
We celebrate individuality and adventure through eclectic designs that transform spaces into personal expressions of joy.
Natural harmony
Experience the beauty of nature with earthy tones and sustainable materials
Crafted for your home
Explore authentic bohemian designs made from premium natural materials, bringing tranquility to your space
Fix: Sold Out Display Issue
This guide shows how to fix the incorrect 'Sold Out' display when products have inventory available and 'Continue selling when out of stock' is enabled.
Important: The issue occurs because the theme checks
❌ INCORRECT - Current Code (causes the issue):
product.available or variant.available, which returns false when inventory is 0, even if "Continue selling when out of stock" is enabled.
{% if product.available %}
Add to Cart
{% else %}
Sold Out
{% endif %}
{% comment %}Badge check{% endcomment %}
{% unless product.available %}
Sold Out
{% endunless %}
✅ CORRECT - Fixed Code:
{% liquid
assign is_truly_sold_out = false
if product.selected_or_first_available_variant.inventory_management == 'shopify'
if product.selected_or_first_available_variant.inventory_policy == 'deny'
if product.selected_or_first_available_variant.inventory_quantity < 1
assign is_truly_sold_out = true
endif
endif
endif
%}
{% if is_truly_sold_out %}
Sold Out
{% else %}
Add to Cart
{% endif %}
{% comment %}Badge check{% endcomment %}
{% if is_truly_sold_out %}
Sold Out
{% endif %}
For Product Cards (simplified):
{% liquid
assign card_product = product
assign is_sold_out = false
for variant in card_product.variants
if variant.inventory_management == 'shopify'
if variant.inventory_policy == 'deny' and variant.inventory_quantity < 1
assign is_sold_out = true
break
endif
endif
endfor
if card_product.variants.size == 0
assign is_sold_out = true
endif
%}
{% if is_sold_out %}
Sold Out
{% endif %}
What to do:
- Find your theme's product card snippet (usually
card-product.liquidor similar) - Find your product page template (usually
main-product.liquid) - Replace the availability checks with the corrected logic above
- Look for code that checks
product.available,variant.available, or similar - Test with a product that has inventory policy set to "Continue selling"