diff --git a/packages/composables/src/composables/useCart/index.ts b/packages/composables/src/composables/useCart/index.ts index 27a7d1be8..414ff787d 100644 --- a/packages/composables/src/composables/useCart/index.ts +++ b/packages/composables/src/composables/useCart/index.ts @@ -386,9 +386,13 @@ const factoryParams: UseCartFactoryParams = { ) => !!currentCart?.items.find((cartItem) => cartItem?.product?.uid === product.uid), loadTotalQty: async (context: Context) => { const apiState = context.$magento.config.state; - const { data } : any = await context.$magento.api.cartTotalQty(apiState.getCartId()); + if (apiState.getCartId()) { + const { data } : any = await context.$magento.api.cartTotalQty(apiState.getCartId()); - return data?.cart?.total_quantity ?? 0; + return data?.cart?.total_quantity ?? 0; + } + + return 0; }, }; diff --git a/packages/theme/nuxt.config.js b/packages/theme/nuxt.config.js index 8e4a3f006..0736c7829 100755 --- a/packages/theme/nuxt.config.js +++ b/packages/theme/nuxt.config.js @@ -107,7 +107,7 @@ export default () => { '@vue-storefront/middleware/nuxt', '@nuxt/image', ['@vue-storefront/cache/nuxt', { - enabled: process.env.REDIS__ENABLED, + enabled: false, invalidation: { endpoint: process.env.REDIS__CACHE_INVALIDATE_URL, key: process.env.REDIS__CACHE_INVALIDATE_KEY, diff --git a/packages/theme/pages/Category.vue b/packages/theme/pages/Category.vue index d32679f2a..497266b5d 100644 --- a/packages/theme/pages/Category.vue +++ b/packages/theme/pages/Category.vue @@ -32,8 +32,8 @@ -