protected function getResultAdded(array $data)
    {
        $options = array(
            'user_id' => $data['user_id'],
            'store_id' => $data['store_id']
        );

        $vars = array('@url' => $this->url->get('checkout'));
        $message = $this->translation->text('Product has been added to your cart. <a href="@url">Checkout</a>', $vars);

        return array(
            'redirect' => '',
            'message' => $message,
            'severity' => 'success',
            'cart_id' => $data['cart_id'],
            'quantity' => $this->cart->getQuantity($options, 'total')
        );
    }
protected function getResultAdded(array $data)
    {
        $options = array(
            'user_id' => $data['user_id'],
            'store_id' => $data['store_id']
        );

        $vars = array('@url' => $this->url->get('checkout'));
        $message = $this->translation->text('Product has been added to your cart. <a href="@url">Checkout</a>', $vars);

        return array(
            'redirect' => '',
            'message' => $message,
            'severity' => 'success',
            'cart_id' => $data['cart_id'],
            'quantity' => $this->cart->getQuantity($options, 'total')
        );
    }
protected function getResultAdded ( array $ data ) { $ options = array ( 'user_id' => $ data [ 'user_id' ] , 'store_id' => $ data [ 'store_id' ] ) ; $ vars = array ( '@url' => $ this -> url -> get ( 'checkout' ) ) ; $ message = $ this -> translation -> text ( 'Product has been added to your cart. <a href="@url">Checkout</a>' , $ vars ) ; return array ( 'redirect' => '' , 'message' => $ message , 'severity' => 'success' , 'cart_id' => $ data [ 'cart_id' ] , 'quantity' => $ this -> cart -> getQuantity ( $ options , 'total' ) ) ; }
Returns an array of resulting data after a product has been added to a cart
@param array $data
@return array
Returns an array of resulting data after a product has been added to a cart