Hello,
I am adding several products to the basket via an ajax call :
var postData = { 'cartcmd': 'addmulti', 'ProductLoopCounter1' : 1, 'ProductNumber1' : 1234, 'Quantity1' : 1, 'ProductLoopCounter2' : 2, 'ProductNumber2' : 12345, 'Quantity2' : 1 // etc. }; $.ajax({ async: false, type: 'POST', url: '/Default.aspx', data: postData, error: function (data) { alert(data); }, success: function (data) { location.reload(); } });
It works fine enough, but the problem is that I don't know how to get the errors. If there is a problem with one of the products, the http status is still ok, and the 'data' I get is a whole HTML page.
Is it possible to have a summary of the errors in a way that is easy to get in javascript ?
Thanks.