|
@@ -107,12 +107,17 @@ $(function() { |
|
@@ -107,12 +107,17 @@ $(function() { |
107
|
$('#removed_products').delegate('.send-to-favorite', 'click', function() {
|
107
|
$('#removed_products').delegate('.send-to-favorite', 'click', function() {
|
108
|
var $removedProduct = $(this).parents('.removed-product');
|
108
|
var $removedProduct = $(this).parents('.removed-product');
|
109
|
|
109
|
|
110
|
- Cart.sendToFavorite([$.parseJSON($(this).attr('data-product_info'))], function() {
|
110
|
+ var info = $.parseJSON($(this).attr('data-product_info'));
|
|
|
111
|
+
|
|
|
112
|
+ Cart.sendToFavorite([info], function() {
|
111
|
if ($('#removed_products .removed-product').length > 1) {
|
113
|
if ($('#removed_products .removed-product').length > 1) {
|
112
|
$removedProduct.remove();
|
114
|
$removedProduct.remove();
|
113
|
} else {
|
115
|
} else {
|
114
|
$('#removed_products').html('');
|
116
|
$('#removed_products').html('');
|
115
|
}
|
117
|
}
|
|
|
118
|
+
|
|
|
119
|
+ // clear removed memory
|
|
|
120
|
+ Cart.clearRemovedMemory(info.productSku);
|
116
|
});
|
121
|
});
|
117
|
}).delegate('.buy-again', 'click', function() {
|
122
|
}).delegate('.buy-again', 'click', function() {
|
118
|
var productInfo = $.parseJSON($(this).attr('data-rebuy_info')),
|
123
|
var productInfo = $.parseJSON($(this).attr('data-rebuy_info')),
|
|
@@ -125,6 +130,9 @@ $(function() { |
|
@@ -125,6 +130,9 @@ $(function() { |
125
|
} else {
|
130
|
} else {
|
126
|
$('#removed_products').html('');
|
131
|
$('#removed_products').html('');
|
127
|
}
|
132
|
}
|
|
|
133
|
+
|
|
|
134
|
+ // clear removed memory
|
|
|
135
|
+ Cart.clearRemovedMemory(productInfo.productSku);
|
128
|
});
|
136
|
});
|
129
|
});
|
137
|
});
|
130
|
});
|
138
|
});
|