Reputation: 183
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
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
Reputation: 613
Check this extension it might be useful:
http://www.magento-connect.org/easy-ajax-cart-magento-extensions.html
Upvotes: 0