diff --git a/packages/api-client/src/api/getProduct/index.ts b/packages/api-client/src/api/getProduct/index.ts index 5df4ba143..cab4f921e 100644 --- a/packages/api-client/src/api/getProduct/index.ts +++ b/packages/api-client/src/api/getProduct/index.ts @@ -131,9 +131,11 @@ export default async function getProduct( } } }` + + const curLocaleCode = params.curLocaleCode; const variables = { handle: params.slug, - country: getCountry(context), + country: curLocaleCode === "en" ? "US" : (curLocaleCode).toUpperCase(), selectedOptions: chosenVariant } diff --git a/packages/composables/src/useProduct/index.ts b/packages/composables/src/useProduct/index.ts index b9a0e5279..73a4fd241 100644 --- a/packages/composables/src/useProduct/index.ts +++ b/packages/composables/src/useProduct/index.ts @@ -9,11 +9,9 @@ import { ProductsResponse } from '../types'; const params: UseProductFactoryParams = { productsSearch: async (context: Context, params: ProductsSearchParams): Promise => { const APP = context.$shopify.config.app; - // check if cart is already initiated - const curLocaleCode = APP.$cookies.get('CurLocaleLang'); const { customQuery, ...searchParams } = params; - searchParams.curLocaleCode = curLocaleCode; + searchParams.curLocaleCode = APP.i18n.locale; return await context.$shopify.api.getProduct(searchParams, customQuery); } };