New Shopify Certification now available: Liquid Storefronts for Theme Developers

Quantity Selector if statement

EMFabrics
New Member
5 0 0

Hi,

 

Was wondering if anyone knew the quantity selector variable I could extract using an if statement for the amount selected on the quantity selector

 

I'm trying to write and if statement to convert a quantity of 1 to a message ,2,3,4 etc

 

I have the tried the following but can't seem to get the correct results. it always returns no quantity selected

 

{% if quantity =='1' %}
This is 1 Metre
{% else %}
No quantity selected
 
{% endif %}
{% if quantity_selector =='1' %}
This is 1 Metre
{% else %}
No quantity selected {% endif %}

{% endif %}
{% if line_item.quantity=='1' %}
This is 1 Metre
{% else %}
No quantity selected {% endif %}

 

Many Thanks

Replies 0 (0)