Quantity hasa double box

Hi everyone . I’m having a weird problem where I keep getting double + and - boxes . One works and changes the quantity but the other breaks the number . Any help here would be great .


<div class="qty qty-changer" data-item-qty data-variant-id="{{ item.variant_id }}" data-line-number="{{ forloop.index }}">
    <button class="decrease js-qty-button-minus"></button>
    {% assign variants = item.product.variants %}
    {% for variant in variants %}
        {% assign inventory_quantity = 0 %}
        {% if variant.id == item.variant_id %}
            {% if variant.inventory_management == 'shopify' %}
                {% assign inventory_quantity = variant.inventory_quantity %}
                {% if variant.inventory_policy == 'continue' %}
                    {% assign inventory_quantity = 1000 %}
                {% endif %}
                {% break %}
            {% endif %}
        {% endif %}
    {% endfor %}
    {% if inventory_quantity == 0 %}
        {% assign inventory_quantity = 1000 %}
    {% endif %}
    <input class="qty-input js-qty-input" type="number" value="{{ item.quantity }}" data-min="1" data-max="{{ inventory_quantity | default:1000 }}" pattern="[0-9]*">
    <button class="increase js-qty-button-plus"></button>

Hey @shawnclift!
Welcome to the Forum!

Would you please mind giving a link to your project and explain more detail about your problem?

Hi I don’t think I can provide a link as its a shopify shop under construction but I will atach a picture that will hopefully explain the problem a bit better .

what happens when it broken?
Shot please.

So it breaks when clicking the up and down box but works when clicking the + & - . I can’t seem to delete the up and down box.

Are you using PHP or any other lang?

the up and down should be because of being type number, but if you have other logic to determine its content it may break for that

Urghhh I don’t think . I’m using shopify which uses .liquid file which is HTML, CSS and .JS

So if I delete


It does this in the image which would be fine but as you can see it’s over lapping .

at that point you need to use css to size it

or you change your logic to use the value of the input of type number

hmmm ok I’m new to this all, so I think that is a bit out of my skills .