Exemple #1
0
 /**
  * @param $key
  */
 public function remove($key)
 {
     if (isset($this->cust_data['cart'][$key])) {
         unset($this->cust_data['cart'][$key]);
         // remove balance credit from session when any products removed from cart
         unset($this->cust_data['used_balance']);
         //if logged in customer, save cart content
         if ($this->customer && ($this->customer->isLogged() || $this->customer->isUnauthCustomer())) {
             $this->customer->saveCustomerCart();
         }
     }
 }