I need to update quantity of cart items without reloading whole page(using ajax) but with simple code not a lengthy method. anybody please help me out.

  • Which magento version
    – Amit Bera
    Apr 29, 2016 at 10:59
  • magento 1.9 version
    – Laty
    Apr 29, 2016 at 11:00
  • 1
    Suggestion to be use any 3rd party extension
    – Amit Bera
    Apr 29, 2016 at 11:01
  • Without a lengthy method. you cannot do it
    – Amit Bera
    Apr 29, 2016 at 11:02
  • i need customization without third party extension
    – Laty
    Apr 29, 2016 at 11:07

2 Answers 2


Use below code:

            var form = jQuery(jQuery(this).closest('form'));

            // we'll extract the action and method attributes out of the form

            // kick off an ajax request using the form's action and method,
            // with the form data as payload
                url: form.attr('action'),
                method: form.attr('method'),
                data: form.serializeArray()

Hope it will helpful to you.

  • When i am refreshing cart page it's updating cart not on click of "Update" button.
    – Magecode
    Aug 24, 2017 at 6:47

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.