Add to Cart is adding item twice! Help!

Brian_Howard
Shopify Partner
9 0 0

I just noticed that anytime you hit add to cart on an item, it is putting it in double... Also the buttons 'View Cart' and 'Continue Shopping' are also displaying twice now.... Please assist. Thank you.

Replies 10 (10)
Brian_Howard
Shopify Partner
9 0 0

Don't know if this helps diagnose, but here is a portion from the products.liquid:

 

          <form action="/cart/add" method="post" enctype="multipart/form-data" class="product-form">
            <select name="id" id="ProductSelect" class="product-single__variants">
              {% for variant in product.variants %}
                {% if variant.available %}
                  <option {% if variant == product.selected_or_first_available_variant %} selected="selected" {% endif %} data-sku="{{ variant.sku }}" 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.product_quantity_enable %}
              <div class="product-single__quantity">
                <label for="Quantity">{{ 'products.product.quantity' | t }}</label>
                <input type="number" id="Quantity" name="quantity" value="1" min="1">
              </div>
            {% endif %}

            <div class="product-single__cart-submit-wrapper">
              <button type="submit" name="add" id="AddToCart" class="btn product-single__cart-submit btn--secondary">
                <span id="AddToCartText">{{ 'products.product.add_to_cart' | t }}</span>
              </button>
              

            </div>

          </form>

Alex23
Shopify Staff (Retired)
521 1 107

Hey, Brian!

My name is Alex, I'm a guru here at Shopify!

So sorry to hear that you're seeing this issue!  I've visited your site and I'm seeing the same results - this would happen due to coding changes to your site.  Had you made changes recently, or installed an app, that might be causing this issue?  If you installed an app recently before you started seeing this behaviour, I'd suggest reaching out to them for assistance.  If not, your theme developer can help!  I'll reach out via email once I've posted this response; if this is a Shopify made theme, I'll be able to look into this more closely for you.  If this theme is made by a third party developer, it's best to reach out to them for support directly instead!

Please feel free to give us a call or start a live chat at any time, we're open 24/7 for your convenience and always happy to assist!

Cheers,

Alex | Shopify Guru

Alex | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

Brian_Howard
Shopify Partner
9 0 0

Yes, please assist on this matter... Have not installed any apps recently.... Just started happening. Need this fixed. This is a shopify theme.... Thank you very much.

Jayvin
Shopify Partner
274 41 76

Hi Brian, 

Well, I think you have this app installed. https://apps.shopify.com/mps-buy-me

And there are two buttons with same ids, the sticky add to cart button and the add to cart button that is on the page have same ids('AddToCart'). Maybe this is causing the products to be added twice.

Please disable the app temporarily to check the default 'Add to cart' behavior. Or contact that app administrator.

 

Brian_Howard
Shopify Partner
9 0 0

Thanks but this doesn't seem to be the problem... I tested but with same result. Also this has been running successfully for many months.

Jayvin
Shopify Partner
274 41 76

Hi Brian,

If you want I can have look into your theme js files and fix this issue asap.

Let me know your email address so that we can further discuss over there.

Thanks.

Brian_Howard
Shopify Partner
9 0 0

I need someone to help troubleshoot a bug... Probably not a big deal but needs to be able to diagnose and correct code where issue... Need this asap... Who can help?

Jayvin
Shopify Partner
274 41 76

Hi Brian,

I am on it right now.

Jayvin
Shopify Partner
274 41 76

Check your emails Brian. Thanks.