I have been working on Magento, I am using an ajax cart extension to adding the product to cart, and its working good. the only problem I am having is once we click add to cart button is adding the product to cart, and if we click the button twice and so on the product keeps adding to the cart or quantity of the item in cart increases on every click on "add to cart" button,

I think it's Magento's default functionality, And I am trying to show a dialogue stating this product is already in the cart'* when the product is already added before in the cart while clicking on the "add to cart" button.

Any ideas for the function are welcomed.

  • This is not default magento behaviour - I think there is something wrong with the ajax cart extension.
    – jscar
    Sep 1, 2017 at 8:43
  • @jscar i think it is, just checked it out on new magento setup. see magento-demo.lexiconn.com
    – Lalit838
    Sep 1, 2017 at 10:06
  • Oh! I stand corrected. Strange thing is on my sites a double-click only adds a single item but I can't see any difference in the javascript being called to your default site.
    – jscar
    Sep 1, 2017 at 10:28
  • Its not about double click. its adding product again if the button clicked again after and event is fired. Double-click just selects or highlights the button.
    – Lalit838
    Sep 1, 2017 at 10:40
  • OK. I misunderstood 'click the button twice'.
    – jscar
    Sep 1, 2017 at 10:43

1 Answer 1


Take a look at:

  1. Product -> Inventory -> Maximum Qty Allowed in Shopping Cart
  2. System -> Configuration -> Inventory -> Maximum Qty Allowed in Shopping Cart

enter image description here

  • I think with this option i can not edit product quantity in cart? @raymond
    – Lalit838
    Sep 1, 2017 at 7:37
  • Ah right --- I misunderstood. Apologies. Sep 1, 2017 at 7:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.