// Fix blockcart removing products
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@11540 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
1 parent
f182be7896
commit
5866679f7c
4 files changed
+10
-6
No files matched your search
@@ -81,8 +81,10 @@ var ajaxCart = {
|
||||
productAttributeId = parseInt(ids[1]);
|
||||
}
|
||||
|
||||
var idAddressDelivery = $(this).parent().parent().attr('id').match(/.*_\d+_\d+_(\d+)/)[1];
|
||||
|
||||
// Removing product from the cart
|
||||
ajaxCart.remove(productId, productAttributeId, customizationId);
|
||||
ajaxCart.remove(productId, productAttributeId, customizationId, idAddressDelivery);
|
||||
return false;
|
||||
});
|
||||
},
|
||||
@@ -243,7 +245,7 @@ var ajaxCart = {
|
||||
},
|
||||
|
||||
//remove a product from the cart via ajax
|
||||
remove : function(idProduct, idCombination, customizationId){
|
||||
remove : function(idProduct, idCombination, customizationId, idAddressDelivery){
|
||||
//send the ajax request to the server
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
@@ -251,7 +253,7 @@ var ajaxCart = {
|
||||
async: true,
|
||||
cache: false,
|
||||
dataType : "json",
|
||||
data: 'controller=cart&delete=1&id_product=' + idProduct + '&ipa=' + ((idCombination != null && parseInt(idCombination)) ? idCombination : '') + ((customizationId && customizationId != null) ? '&id_customization=' + customizationId : '') + '&token=' + static_token + '&ajax=true',
|
||||
data: 'controller=cart&delete=1&id_product=' + idProduct + '&ipa=' + ((idCombination != null && parseInt(idCombination)) ? idCombination : '') + ((customizationId && customizationId != null) ? '&id_customization=' + customizationId : '') + '&id_address_delivery=' + idAddressDelivery + '&token=' + static_token + '&ajax=true',
|
||||
success: function(jsonData) {
|
||||
ajaxCart.updateCart(jsonData);
|
||||
if ($('body').attr('id') == 'order' || $('body').attr('id') == 'order-opc')
|
||||
|
||||
Reference in new issue
Block a user