public function UcAjaxCart::removeItemFromCart in Ubercart AJAX Cart 7.2
Same name and namespace in other branches
- 6.2 uc_ajax_cart.php \UcAjaxCart::removeItemFromCart()
File
- ./
uc_ajax_cart.extender.inc, line 24
Class
Code
public function removeItemFromCart($nid, $data) {
$content = $this
->getCartContents();
$product = node_load($nid);
if ($product->type == 'product_kit') {
foreach ($data as $nid => $product) {
uc_cart_remove_item($nid, uc_cart_get_id(), $product->data);
}
}
else {
uc_cart_remove_item($nid, uc_cart_get_id(), $data);
}
}