diff --git a/lib/sylius/index.ts b/lib/sylius/index.ts index 3ac0dc8069..82c3bf4d34 100644 --- a/lib/sylius/index.ts +++ b/lib/sylius/index.ts @@ -159,9 +159,10 @@ export const createCart = async (): Promise => { return normalizeCart(syliusCart); }; -export const getCart = (cartId: string) => { - syliusRequest(REST_METHODS.GET, `/orders/${cartId}`); - return {}; +export const getCart = async (cartId: string): Promise => { + const data = await syliusRequest(REST_METHODS.GET, `/orders/${cartId}`); + const syliusCart = data.body; + return normalizeCart(syliusCart); }; export const addToCart = (cartId: string | undefined, payload: AddToCartPayload[]) => { syliusRequest(REST_METHODS.PUT, `/orders/${cartId}/items`, payload[0]);