Quantity is increasing by 2 instead of by 1

Solved
New Member
4 0 0

Our quantity box only shows 1, 3, 5, etc. It is increasing by 1 but I cannot figure out why. Has anyone else had this issue? 

 

<select name="id" id="ProductSelect-{{ section_id }}" class="product-single__variants no-js">
{% for variant in product.variants %}
{% if variant.available %}
<option {% if variant == product.selected_or_first_available_variant %}
selected="selected" {% endif %}
value="{{ variant.id }}">
{{ variant.title }} - {{ variant.price | money_with_currency }}
</option>
{% else %}
<option disabled="disabled">
{{ variant.title }} - {{ 'products.product.sold_out' | t }}
</option>
{% endif %}
{% endfor %}
</select>

{% if settings.quantity_enable %}
<div class="product__quantity product__quantity--{{ settings.variant_type }}">
<label for="Quantity-{{ section_id }}">{{ 'products.product.quantity' | t }}</label>
{% include 'quantity-input', id: section_id, qty: 1, min: 1 %}
</div>
{% endif %}

{%- assign inventory_visible = false -%}
{%- if current_variant.inventory_management == 'shopify' -%}
{%- if current_variant.inventory_quantity <= settings.inventory_threshold and current_variant.inventory_quantity >= 0 -%}
{%- assign inventory_visible = true -%}
{%- endif -%}
{%- endif -%}
{%- if current_variant.inventory_quantity == 0 -%}
{%- assign inventory_visible = false -%}
{%- endif -%}

<div
id="ProductInventory-{{ section_id }}"
class="product__inventory {% unless inventory_visible %}hide{% endunless %}"
>
{% if current_variant.available %}
{{ 'products.product.stock_label' | t: count: current_variant.inventory_quantity }}
{% endif %}
</div>

{%- if settings.inventory_transfers_enable -%}
<div
id="ProductIncomingInventory-{{ section_id }}"
class="product__inventory{% if inventory_visible %} hide{% endif %}">
{%- if current_variant.incoming and inventory_visible == false -%}
{%- if current_variant.next_incoming_date -%}
{% assign date = current_variant.next_incoming_date | date: format: 'date' %}
{%- if current_variant.available -%}
{{ 'products.product.will_not_ship_until' | t: date: date }}
{%- else -%}
{{ 'products.product.will_be_in_stock_after' | t: date: date }}
{%- endif -%}
{%- else -%}
{{ 'products.product.waiting_for_stock' | t }}
{%- endif -%}
{%- endif -%}
</div>
{%- endif -%}

0 Likes
Shopify Partner
1061 118 170

If you can share the content of snippets/quantity-input.liquid that would help.

Sergiu Svinarciuc | CTO @ visely.io
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!
- To learn more about the awesome stuff we do head over to visely.io or our blog
0 Likes
New Member
4 0 0


class="js-qty__num"
value="{{ qty }}"
min="{{ min }}"
aria-label="quantity"
pattern="[0-9]*"
name="quantity">

class="js-qty__adjust js-qty__adjust--minus"
aria-label="{{ 'cart.general.reduce_quantity' | t }}">
{% include 'icon-minus' %}



class="js-qty__adjust js-qty__adjust--plus"
aria-label="{{ 'cart.general.increase_quantity' | t }}">
{% include 'icon-plus' %}
+



0 Likes
Shopify Partner
1061 118 170

OK, looks like the logic is somewhere in your JavaScript files. Can you share a preview URL to your store, that would help debugging.

Sergiu Svinarciuc | CTO @ visely.io
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!
- To learn more about the awesome stuff we do head over to visely.io or our blog
0 Likes
New Member
4 0 0
https://www.katiekime.com/products/in-check-10-plate


-Pleasetypeyourreplyabovethisline-
Natalie

Natalie Moore
CPO\Partner
>

[cid:apple-icon-76x76_c8aa45a7-6ce6-4af1-bbc5-e106575026e7.png]
LIVE WELL.
CELEBRATE MORE.
TRAVEL OFTEN.
[cid:instagram-social-network-logo-of-photo-camera_1d2852e6-f3ad-45b1-bb3a-5dba62f816a7.png] [cid:facebook-logo_f161e9b4-e492-4cc3-a428-4f8a8bb1d1c2.png] [cid:pinterest-social-logo_d46ca657-0fd6-47b8-871e-711354cd43bf.png]


1405 E. Cesar Chavez
Austin, TX 78702
e: natalie@katiekime.com


WWW.KATIEKIME.COM
This communication, along with any attachments, is covered by federal and state law governing electronic communications and may contain confidential and legally privileged information. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution, use or copying of this message is strictly prohibited. If you have received this in error, please reply immediately to the sender and delete this message.
0 Likes

Success.

Shopify Partner
1061 118 170

Your -/+ buttons have two identical events attached which are firing twice per click. This is because you have two versions of vendor-scripts JavaScript files referenced in your theme code.

 

<script src="//cdn.shopify.com/s/files/1/0665/3515/t/94/assets/vendor-scripts-v4.js" defer="defer"></script>

and

<script src="//cdn.shopify.com/s/files/1/0665/3515/t/94/assets/vendor-scripts.js" defer="defer"></script>

 

Most probably you can locate them in the layout/theme.liquid, look for "vendor-scripts" and remove one of them.

Sergiu Svinarciuc | CTO @ visely.io
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!
- To learn more about the awesome stuff we do head over to visely.io or our blog
0 Likes
New Member
4 0 0
That worked thank you!
0 Likes