Add to Cart issue - notification showing twice

Highlighted
Shopify Partner
12 0 0

Hi - I am having an issue where the text " Added to cart! View cart or continue shopping." is showing twice.

I have followed the instructions here also: http://docs.shopify.com/support/your-store/products/how-to-ajaxify-your-cart

I am using Minimal theme: www.andtheylivedgreen.co.nz

Could you please help?

Thanks!

0 Likes
Highlighted
Excursionist
52 0 5

this is a short term solution just to hide the 2nd notification from showing (but its still there in your source code)

 add this to your css file. presumably styles.css

#product .ajaxified-cart-feedback:nth-child(5) {
    display: none;
}

 

 

you might want to find out how to remove the duplicate notification out completely though.

0 Likes
Highlighted
Shopify Partner
12 0 0

Thanks for your quick response :)

I added this to the styles.scss.liquid but unfortunately it hasn't taken away the duplication :(

Any other ideas would be greatly appreciated

Thanks

0 Likes
Highlighted
Astronaut
1890 1 442

You have installed an out-of-stock app.  This app creates another submit button that is hidden.  After you add the product to cart, the "Added to cart!" message will be generated after each of the submit buttons (i.e. the default submit button and the submit button created by the out-of-stock app).  Therefore you see the message twice.

To fix this, we want to be more specific with which submit button the message is generated after.  Edit HTML/CSS and open ajaxify-cart.liquid.  Search for:

find('input[type="submit"]')

You should find two instances of it.  Change them to:

find('input[type="submit"][id="add-to-cart"]')

With this change, the "Added to cart!" message will not be generated when clicking on the submit button created from the out-of-stock app.  I hope this helps.

1 Like
Highlighted
Shopify Partner
12 0 0

Awesome - thank you. All fixed :)

0 Likes
Highlighted
New Member
2 0 0

Hi I have a similar issue but I don't have any out of stock app installed. I currently using the vogue theme. I tried the solution you provided however it just stops ajaxify from working and goes back to the normal "straight to cart" page. 103793818_1153357678351090_6932160632710491971_n.jpg

0 Likes
Highlighted
New Member
1 0 0

Did you ever fix this issue? I'm having the exact same problem!

0 Likes