From 60aa375688fcb08996d7e5c262ea1735638208dd Mon Sep 17 00:00:00 2001 From: dMetzger Date: Fri, 17 Aug 2012 07:36:36 +0000 Subject: [PATCH] // Changed error management of ajax cart #PSCFV-3646 --- modules/blockcart/ajax-cart.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/modules/blockcart/ajax-cart.js b/modules/blockcart/ajax-cart.js index 4e84f3bf1..14c60d57a 100644 --- a/modules/blockcart/ajax-cart.js +++ b/modules/blockcart/ajax-cart.js @@ -120,9 +120,8 @@ var ajaxCart = { } }, - // cart to fix display when using back and previous browsers buttons + // Fix display when using back and previous browsers buttons refresh : function(){ - //send the ajax request to the server $.ajax({ type: 'GET', url: baseUri, @@ -133,9 +132,6 @@ var ajaxCart = { success: function(jsonData) { ajaxCart.updateCart(jsonData); - }, - error: function(XMLHttpRequest, textStatus, errorThrown) { - //alert("TECHNICAL ERROR: unable to refresh the cart.\n\nDetails:\nError thrown: " + XMLHttpRequest + "\n" + 'Text status: ' + textStatus); } }); }, @@ -241,7 +237,7 @@ var ajaxCart = { }, error: function(XMLHttpRequest, textStatus, errorThrown) { - alert("TECHNICAL ERROR: unable to add the product.\n\nDetails:\nError thrown: " + XMLHttpRequest + "\n" + 'Text status: ' + textStatus); + alert("Impossible to add the product to the cart.\n\ntextStatus: '" + textStatus + "'\nerrorThrown: '" + errorThrown + "'\nresponseText:\n" + XMLHttpRequest.responseText); //reactive the button when adding has finished if (addedFromProductPage) $('body#product p#add_to_cart input').removeAttr('disabled').addClass('exclusive').removeClass('exclusive_disabled');