public function toWishlist($cart_id)
    {
        $result = null;
        $this->hook->attach('cart.move.wishlist.before', $cart_id, $result, $this);

        if (isset($result)) {
            return (array) $result;
        }

        $cart = $this->cart->get($cart_id);

        if (empty($cart) || !$this->cart->delete($cart_id)) {
            return $this->getResultError();
        }

        $result = $this->addToWishlist($cart);

        gplcart_static_clear();

        $this->hook->attach('cart.move.wishlist.after', $data, $result, $this);
        return (array) $result;
    }
public function toWishlist($cart_id)
    {
        $result = null;
        $this->hook->attach('cart.move.wishlist.before', $cart_id, $result, $this);

        if (isset($result)) {
            return (array) $result;
        }

        $cart = $this->cart->get($cart_id);

        if (empty($cart) || !$this->cart->delete($cart_id)) {
            return $this->getResultError();
        }

        $result = $this->addToWishlist($cart);

        gplcart_static_clear();

        $this->hook->attach('cart.move.wishlist.after', $data, $result, $this);
        return (array) $result;
    }
public function toWishlist ( $ cart_id ) { $ result = null ; $ this -> hook -> attach ( 'cart.move.wishlist.before' , $ cart_id , $ result , $ this ) ; if ( isset ( $ result ) ) { return ( array ) $ result ; } $ cart = $ this -> cart -> get ( $ cart_id ) ; if ( empty ( $ cart ) || ! $ this -> cart -> delete ( $ cart_id ) ) { return $ this -> getResultError ( ) ; } $ result = $ this -> addToWishlist ( $ cart ) ; gplcart_static_clear ( ) ; $ this -> hook -> attach ( 'cart.move.wishlist.after' , $ data , $ result , $ this ) ; return ( array ) $ result ; }
Moves a cart item to a wishlist
@param int $cart_id
@return array
Moves a cart item to a wishlist