Nagamani
Nagamani

Reputation: 183

Update quantity value in minicart using ajax in magento

I am a beginner in magento.

Hi all i need to update quantity value for each product in minicart header(as flipkart) using ajax in magento.

I need to know the function to update the quantity value.

Any help will be appreciated.

Upvotes: 0

Views: 2813

Answers (2)

Nagamani
Nagamani

Reputation: 183

I have got it working.

Please find following code for your reference.

url=jQuery('#minicart_popup').attr('action');
    var myAjax = new Ajax.Request(
    url,
    {
        method: 'post',
        postBody: $('minicart_popup').serialize(),
            parameters : Form.serialize("minicart_popup"),
                onException: function (xhr, e)
        {
            alert('Exception : ' + e);
        },
onComplete: function (xhr)
        {

           // Do your stuff here           

        }

    });

Upvotes: 1

Shatir
Shatir

Reputation: 613

Check this extension it might be useful:

http://www.magento-connect.org/easy-ajax-cart-magento-extensions.html

Upvotes: 0

Related Questions