public function set(CartInterface $cart)
    {
        if (!$this->saveInSession) {
            return $this;
        }

        $this
            ->session
            ->set(
                $this->sessionFieldName,
                $cart->getId()
            );

        return $this;
    }
public function set(CartInterface $cart)
    {
        if (!$this->saveInSession) {
            return $this;
        }

        $this
            ->session
            ->set(
                $this->sessionFieldName,
                $cart->getId()
            );

        return $this;
    }
public function set ( CartInterface $ cart ) { if ( ! $ this -> saveInSession ) { return $ this ; } $ this -> session -> set ( $ this -> sessionFieldName , $ cart -> getId ( ) ) ; return $ this ; }
Set Cart in session.

@param CartInterface $cart Cart

@return $this Self object
Set Cart in session .