We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No option to ammend a locale parameter (e.g. from next-intl) to redirect to the checkout in the correct languange.
The text was updated successfully, but these errors were encountered:
Hey, you just need to adjust the cart query:
export const getCartQuery = (language?: string) => /* GraphQL */ ` query getCart($cartId: ID!) @inContext(language: ${(language ?? 'DE').toUpperCase()}) { cart(id: $cartId) { ...cart } } ${cartFragment} `; export async function getCart(cartId: string): Promise<Cart | undefined> { const language = await getLocale(); const res = await shopifyFetch<ShopifyCartOperation>({ query: getCartQuery(language), variables: { cartId }, tags: [TAGS.cart], cache: 'no-store' }); // Old carts becomes `null` when you checkout. if (!res.body.data.cart) { return undefined; } return reshapeCart(res.body.data.cart); }
Sorry, something went wrong.
No branches or pull requests
No option to ammend a locale parameter (e.g. from next-intl) to redirect to the checkout in the correct languange.
The text was updated successfully, but these errors were encountered: