I have implemented the ajax cart update following this. But the issue is when I enter the max qty for a product it does not shows any error. (which is Magento default behavior, should show a popup).But when I reload my page that error shows up.

Does anyone know about this?

default behavior: enter image description here

custom after making it ajax based. enter image description here

], function ($, getTotalsAction, customerData,submitCart) {

    $(document).on('change', 'input[name$="[qty]"]', function(){
        var form = $('form#form-validate');
            url: form.attr('action'),
            data: form.serialize(),
            showLoader: true,
            success: function (res) {
                var parsedResponse = $.parseHTML(res);
                var result = $(parsedResponse).find("#form-validate");
                var sections = ['cart'];
                customerData.reload(sections, true);
                var deferred = $.Deferred();
                getTotalsAction([], deferred);
            error: function (xhr, status, error) {
                var err = eval("(" + xhr.responseText + ")");


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.