Show Products Availability (Estimated Days)

illysgr
Tourist
3 0 1

Hello I have a website, my currently estimated times are : Available, Available in 20 days and unavailable. The only way to know which one is available after some days is to create a tag.

 

Στιγμιότυπο οθόνης 2024-02-20 163936.jpg

 

 

The code I am using in my product-template.liquid :

{% if product.selected_or_first_available_variant.inventory_management == "shopify" %}
{% if product.selected_or_first_available_variant.inventory_quantity > 0 %}
🟢 Available between 1 - 3 days.
{% elsif product.tags contains "availability:Available between 15 - 30 days"}
🟠 Available between 15 - 30 days.
{% else %}
🔴 Unviable.
{% endif %}
{% else %}
🟢 Available between 1 - 3 days.
{% endif %}

 

I can't make it work is there any way?

Replies 0 (0)