How to change text for items that are sold out

{% if product.selected_or_first_available_variant.inventory_quantity < 5 and product.selected_or_first_available_variant.inventory_quantity > 0 %}

🔥 This item is ready to ship and selling fast. Only {{ product.selected_or_first_available_variant.inventory_quantity }} left in stock!

{% elsif product.selected_or_first_available_variant.inventory_quantity > 5 %}

🔥 This item is selling fast and ready to ship.

{% elsif product.selected_or_first_available_variant.inventory_quantity < 1 and product.selected_or_first_available_variant.inventory_management == "shopify" %}

{% comment %} ✈️ This item is on Pre-order. It may take extra 5 working days to reach you {% endcomment %} ❌ This item is out of stock

{% elsif product.variants.first.inventory_management == nil %}

💻 This item is ready to ship from a third party location

{% endif %}

How do i edit my code to show sold out item message to :cross_mark: This item is out of stock

thank you in advance

Hi @Adam_Choong ,
this is the clean version :
{% if product.selected_or_first_available_variant.inventory_quantity < 5 and product.selected_or_first_available_variant.inventory_quantity > 0 %}
:fire: This item is ready to ship and selling fast. Only {{ product.selected_or_first_available_variant.inventory_quantity }} left in stock!

{% elsif product.selected_or_first_available_variant.inventory_quantity > 5 %}
:fire: This item is selling fast and ready to ship.

{% elsif product.selected_or_first_available_variant.inventory_quantity < 1 and product.selected_or_first_available_variant.inventory_management == “shopify” %}
:cross_mark: This item is out of stock

{% elsif product.variants.first.inventory_management == nil %}
:laptop: This item is ready to ship from a third party location

{% endif %}

Thanks
Manoj

:airplane: This item is on Pre-order. It may take extra 5 working days to reach you

I need this text on variants with quantity <1 and are continue selling when sold out

Can you add a liquid code in for this?

Hi @Adam_Choong ,

use this
{% if product.selected_or_first_available_variant.inventory_quantity < 5 and product.selected_or_first_available_variant.inventory_quantity > 0 %}
:fire: This item is ready to ship and selling fast. Only {{ product.selected_or_first_available_variant.inventory_quantity }} left in stock!

{% elsif product.selected_or_first_available_variant.inventory_quantity >= 5 %}
:fire: This item is selling fast and ready to ship.

{% elsif product.selected_or_first_available_variant.inventory_quantity < 1
and product.selected_or_first_available_variant.inventory_policy == “continue” %}
:airplane: This item is on Pre-order. It may take extra 5 working days to reach you

{% elsif product.selected_or_first_available_variant.inventory_quantity < 1
and product.selected_or_first_available_variant.inventory_management == “shopify” %}
:cross_mark: This item is out of stock

{% elsif product.selected_or_first_available_variant.inventory_management == nil %}
:laptop: This item is ready to ship from a third party location

{% endif %}

Thanks
Manoj

Hi @Adam_Choong,

Please change code:

{% if product.selected_or_first_available_variant.inventory_quantity < 5 and product.selected_or_first_available_variant.inventory_quantity > 0 %}
                  🔥 This item is ready to ship and selling fast. Only {{ product.selected_or_first_available_variant.inventory_quantity }} left in stock!

                  {% elsif product.selected_or_first_available_variant.inventory_quantity > 5 %}
                  🔥 This item is selling fast and ready to ship.

                  {% elsif product.selected_or_first_available_variant.inventory_quantity < 1 and product.selected_or_first_available_variant.inventory_management == "shopify" %}
                    {% if product.selected_or_first_available_variant.inventory_policy == 'continue' %}
                      ✈️ This item is on Pre-order. It may take extra 5 working days to reach you
                    {% else %}
                      ❌ This item is out of stock
                    {% endif %}
                  
                  {% elsif product.variants.first.inventory_management == nil %}
                  💻 This item is ready to ship from a third party location

                  {% endif %}

If I helped you, then a Like would be truly appreciated.

thank you so much. this worked!

Hi @Adam_Choong,

It’s my pleasure :blush:

hi @namphan i just realised that the text on the quick add button pop up is not showing correctly. can you assist me on this please?

Hi @Adam_Choong,

Can I send you a collaborator invitation? It will help me check this out.

yes sure how do i do that?

Hi @Adam_Choong,

Please send me the collaborator code in private message, I will send you the invitation and check it