public function setCurrent(Order $cart)
    {
        if (!$cart->IsCart()) {
            trigger_error('Passed Order object is not cart status', E_ERROR);
        }
        $this->order = $cart;
        $session = ShopTools::getSession();
        $session->set(self::config()->cartid_session_name, $cart->ID);

        return $this;
    }
public function setCurrent(Order $cart)
    {
        if (!$cart->IsCart()) {
            trigger_error('Passed Order object is not cart status', E_ERROR);
        }
        $this->order = $cart;
        $session = ShopTools::getSession();
        $session->set(self::config()->cartid_session_name, $cart->ID);

        return $this;
    }
public function setCurrent ( Order $ cart ) { if ( ! $ cart -> IsCart ( ) ) { trigger_error ( 'Passed Order object is not cart status' , E_ERROR ) ; } $ this -> order = $ cart ; $ session = ShopTools :: getSession ( ) ; $ session -> set ( self :: config ( ) -> cartid_session_name , $ cart -> ID ) ; return $ this ; }
Set the current cart

@param Order $cart the Order to use as the current cart-content

@return ShoppingCart
Set the current cart