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