function basic_cart_remove_from_cart in Basic cart 7
Same name and namespace in other branches
- 7.3 basic_cart.cart.inc \basic_cart_remove_from_cart()
- 7.2 basic_cart.cart.inc \basic_cart_remove_from_cart()
Callback function for cart/remove/.
Parameters
int $nid: We are using the node id to remove the node in the shopping cart
1 string reference to 'basic_cart_remove_from_cart'
- basic_cart_menu in ./
basic_cart.module - Implements hook_menu().
File
- ./
basic_cart.cart.inc, line 160 - Basic cart shopping cart implementation functions.
Code
function basic_cart_remove_from_cart($nid = NULL) {
$nid = (int) $nid;
if ($nid > 0) {
unset($_SESSION['basic_cart']['cart'][$nid]);
}
drupal_goto('cart');
}