[-] FO : automatic refresh of the cart when a cart rule is added

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@13577 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
dMetzger
2012-02-23 18:24:23 +00:00
parent 1c7d9a9f26
commit 319309528a
3 changed files with 27 additions and 5 deletions
+8 -2
View File
@@ -258,11 +258,13 @@ function deleteProductFromSummary(id)
var errors = '';
for(error in jsonData.errors)
//IE6 bug fix
if(error != 'indexOf')
if (error != 'indexOf')
errors += jsonData.errors[error] + "\n";
}
else
{
if (jsonData.refresh)
location.reload();
if (parseInt(jsonData.summary.products.length) == 0)
{
$('#center_column').children().each(function() {
@@ -308,7 +310,7 @@ function deleteProductFromSummary(id)
function upQuantity(id, qty)
{
if(typeof(qty)=='undefined' || !qty)
if (typeof(qty) == 'undefined' || !qty)
qty = 1;
var customizationId = 0;
var productId = 0;
@@ -344,6 +346,8 @@ function upQuantity(id, qty)
}
else
{
if (jsonData.refresh)
location.reload();
updateCustomizedDatas(jsonData.customizedDatas);
updateCartSummary(jsonData.summary);
updateHookShoppingCart(jsonData.HOOK_SHOPPING_CART);
@@ -403,6 +407,8 @@ function downQuantity(id, qty)
}
else
{
if (jsonData.refresh)
location.reload();
updateCustomizedDatas(jsonData.customizedDatas);
updateCartSummary(jsonData.summary);
updateHookShoppingCart(jsonData.HOOK_SHOPPING_CART);