Good morning,
I have a problem with the theme
There is no quantity lock present in inventory
I would like the number of available products to appear on the product page and that it is not possible to add quantities to the cart that exceed the available quantities.
I would also like it to be possible for this limit not to be bypassed during checkout and for a quantity limit message to always appear
I’ll show you the code I have and if anyone can help me with this modification
{%- if product.variants.size == 0 -%}
{%- assign id = ‘’ -%}
{%- assign checked = ‘’ -%}
{%- else -%}
{%- for variant in product.variants -%}
{%- if variant.available -%}
{%- assign id = variant.id -%}
{%- assign checked = ‘checked’ -%}
{% break %}
{%- endif -%}
{%- endfor -%}
{%- endif -%}
<input class=“group_product-item” type=“checkbox” value=“{{id}}” {{checked}}>
Thank you