[-] FO : blockcart was only able to remove 1 product at a time #PSCFV-4170
This commit is contained in:
1 parent
f492b58482
commit
b656cfc6c2
1 file changed
+4
-8
@@ -269,7 +269,7 @@ var ajaxCart = {
|
|||||||
//hide the products displayed in the page but no more in the json data
|
//hide the products displayed in the page but no more in the json data
|
||||||
hideOldProducts : function(jsonData) {
|
hideOldProducts : function(jsonData) {
|
||||||
//delete an eventually removed product of the displayed cart (only if cart is not empty!)
|
//delete an eventually removed product of the displayed cart (only if cart is not empty!)
|
||||||
if($('#cart_block #cart_block_list dl.products').length > 0)
|
if ($('#cart_block #cart_block_list dl.products').length > 0)
|
||||||
{
|
{
|
||||||
var removedProductId = null;
|
var removedProductId = null;
|
||||||
var removedProductData = null;
|
var removedProductData = null;
|
||||||
@@ -295,14 +295,9 @@ var ajaxCart = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//remove product if it's no more in the cart
|
//remove product if it's no more in the cart
|
||||||
if(!stayInTheCart)
|
if (!stayInTheCart)
|
||||||
{
|
{
|
||||||
removedProductId = $(this).attr('id');
|
removedProductId = $(this).attr('id');
|
||||||
//return false; // Regarding that the customer can only remove products one by one, we break the loop
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
//if there is a removed product, delete it from the displayed block cart
|
|
||||||
if (removedProductId != null)
|
if (removedProductId != null)
|
||||||
{
|
{
|
||||||
var firstCut = removedProductId.replace('cart_block_product_', '');
|
var firstCut = removedProductId.replace('cart_block_product_', '');
|
||||||
@@ -326,7 +321,8 @@ var ajaxCart = {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user