public function updateCart($data, $user, $locale)
    {
        $cart = $this->getUserCart($user, $locale);
        $userId = $user ? $user->getId() : null;
        $this->orderManager->save($data, $locale, $userId, $cart->getId(), null, null, true);

        $this->removeItemAddressesThatAreEqualToOrderAddress($cart);

        return $cart;
    }
public function updateCart($data, $user, $locale)
    {
        $cart = $this->getUserCart($user, $locale);
        $userId = $user ? $user->getId() : null;
        $this->orderManager->save($data, $locale, $userId, $cart->getId(), null, null, true);

        $this->removeItemAddressesThatAreEqualToOrderAddress($cart);

        return $cart;
    }
public function updateCart ( $ data , $ user , $ locale ) { $ cart = $ this -> getUserCart ( $ user , $ locale ) ; $ userId = $ user ? $ user -> getId ( ) : null ; $ this -> orderManager -> save ( $ data , $ locale , $ userId , $ cart -> getId ( ) , null , null , true ) ; $ this -> removeItemAddressesThatAreEqualToOrderAddress ( $ cart ) ; return $ cart ; }
Updates the cart

@param array $data
@param UserInterface $user
@param string $locale

@throws OrderException
@throws OrderNotFoundException

@return null|Order
Updates the cart