How can I remove quantity from items_left_text in product-form.liquid?

Hi,

I want to remove the quantity in front of the items left text (see below).

I have located the code in the product-form.liquid file (below is the code).

I have tried everything but I can’t see what to remove to remove the quantity.

{% if product.available %}
{% if settings.display_inventory_left %}

{% if variant.inventory_management != blank and variant.inventory_quantity > 0 %} {% capture items_left_text %} {% if variant.inventory_quantity == 1 %} {{ 'products.product.items_left_count.one' | t }} {% else %} {{ 'products.product.items_left_count.other' | t }} {% endif %} {% endcapture %} {% if variant.inventory_quantity <= settings.inventory_threshold %} {{ variant.inventory_quantity }} {{ items_left_text }} {% endif %} {% endif %}
{% endif %} {% endif %}

Help is most welcome.

Hello @Kav1 ,

Try it

{% if product.available %}
{% if settings.display_inventory_left %}

{% if variant.inventory_management != blank and variant.inventory_quantity > 0 %}
{% capture items_left_text %}
{% if variant.inventory_quantity == 1 %}
{{ 'products.product.items_left_count.one' | t }}
{% else %}
{{ 'products.product.items_left_count.other' | t }}
{% endif %}
{% endcapture %}
{% if variant.inventory_quantity <= settings.inventory_threshold %}
 {{ items_left_text }}
{% endif %}
{% endif %}

{% endif %}
{% endif %}

Actually you have to remove this code {{ variant.inventory_quantity }}

Thanks

Hi Guleria.
Thanks a lot for your reply.

For some reason that does not work :(.