public function CartTable::emptyCart in Basic cart 8
Same name and namespace in other branches
- 8.6 src/CartTable.php \Drupal\basic_cart\CartTable::emptyCart()
- 8.0 src/CartTable.php \Drupal\basic_cart\CartTable::emptyCart()
- 8.2 src/CartTable.php \Drupal\basic_cart\CartTable::emptyCart()
- 8.3 src/CartTable.php \Drupal\basic_cart\CartTable::emptyCart()
- 8.4 src/CartTable.php \Drupal\basic_cart\CartTable::emptyCart()
- 8.5 src/CartTable.php \Drupal\basic_cart\CartTable::emptyCart()
* Shopping cart reset.
Overrides CartInterface::emptyCart
File
- src/
CartTable.php, line 72
Class
- CartTable
- Class CartTable.
Namespace
Drupal\basic_cartCode
public function emptyCart() {
$param['uid'] = $this->user_id;
$this->cart_storage
->delete($param);
unset($_SESSION['basic_cart']['cart']);
unset($_SESSION['basic_cart']['cart_quantity']);
}