[+] MO : Blockcart - Add error handler on ajax function

This commit is contained in:
Jerome Nadaud
2013-10-31 19:02:43 +01:00
parent 671062af07
commit 9193a29a44
+7 -1
View File
@@ -131,6 +131,9 @@ var ajaxCart = {
success: function(jsonData)
{
ajaxCart.updateCart(jsonData);
},
error: function(XMLHttpRequest, textStatus, errorThrown) {
alert("TECHNICAL ERROR: \n\nDetails:\nError thrown: " + XMLHttpRequest + "\n" + 'Text status: ' + textStatus);
}
});
},
@@ -736,7 +739,10 @@ $(document).ready(function(){
headers: { "cache-control": "no-cache" },
async: true,
cache: false,
url:$(this).attr('href') + '?rand=' + new Date().getTime()
url:$(this).attr('href') + '?rand=' + new Date().getTime(),
error: function(XMLHttpRequest, textStatus, errorThrown) {
alert("TECHNICAL ERROR: \n\nDetails:\nError thrown: " + XMLHttpRequest + "\n" + 'Text status: ' + textStatus);
}
});
$(this).parent().parent().remove();
if ($('body').attr('id') == 'order' || $('body').attr('id') == 'order-opc')