'How to change the {{ item.quantity }} with dropdown list options. Using Liquid
Does anyone know how I can make "i" become the new "{{ item.quantity }}" ? At the moment, I can select "i" in the dropdown list but this does not change the quantity of items. I need to be able to change the quantity of items so that it can automatically update the price.
Thank you in advance.
<select class="max-w-full rounded-md border border-gray-300 py-1.5 text-base leading-5 font-medium text-gray-700 text-left shadow-sm focus:outline-none focus:ring-1 focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">
{% for i in (0..8) %}
{% if forloop.first == true %}
<option value="{{ item.quantity }}">{{ item.quantity }}</option>
{% else %}
<option value="{{ i }}">{{ i }}</option>
{% endif %}
{% endfor %}
</select>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
