public function deleteFromCart($cart_action_model)
    {
        $result = $cart_action_model->delete($this->getSubmitted('cart_id'));

        if (empty($result['quantity'])) {
            $result['message'] = '';
        }

        if ($this->isAjax()) {
            $result['modal'] = $this->getCartPreview();
            $this->outputJson($result);
        }

        $this->redirect($result['redirect'], $result['message'], $result['severity']);
    }
public function deleteFromCart($cart_action_model)
    {
        $result = $cart_action_model->delete($this->getSubmitted('cart_id'));

        if (empty($result['quantity'])) {
            $result['message'] = '';
        }

        if ($this->isAjax()) {
            $result['modal'] = $this->getCartPreview();
            $this->outputJson($result);
        }

        $this->redirect($result['redirect'], $result['message'], $result['severity']);
    }
public function deleteFromCart ( $ cart_action_model ) { $ result = $ cart_action_model -> delete ( $ this -> getSubmitted ( 'cart_id' ) ) ; if ( empty ( $ result [ 'quantity' ] ) ) { $ result [ 'message' ] = '' ; } if ( $ this -> isAjax ( ) ) { $ result [ 'modal' ] = $ this -> getCartPreview ( ) ; $ this -> outputJson ( $ result ) ; } $ this -> redirect ( $ result [ 'redirect' ] , $ result [ 'message' ] , $ result [ 'severity' ] ) ; }
Deletes a submitted cart item
@param \gplcart\core\models\CartAction $cart_action_model
Deletes a submitted cart item