Caroline
Caroline
AAlokai
Created by Caroline on 3/1/2024 in #🙋|general-help
apiState.setCartId()失败是什么原因
apiState.setCartId()失败是什么原因
1 replies
AAlokai
Created by Caroline on 12/5/2023 in #🙋|general-help
How to extension api for VSF
I was added extension on middleware.config.js like: integrations: { magento: { location: '@vue-storefront/magento-api/server', extensions: (extensions) => [ ...extensions, { name: 'extension-name', extendApiMethods: { customMethod: async (context, params) => { const response = await context.client.mutate({ mutation: gql${CUSTOMER_METHOD}, variables, fetchPolicy: 'no-cache', context: { req: context.req, res: context.res } }); } } } ], }, }, then I was called the customMethod on .vue file, like: import { useVSFContext, onSSR } from '@vue-storefront/core'; export default { setup() { const { $magento} = useVSFContext(); onSSR(async () => { await $magento.api.customMethod({ query: 'test', limit: 20 }) }); } } But when I console.log($magento), the $magento is undefined. I don't know why the $magento is undefined.
1 replies
AAlokai
Created by Caroline on 11/16/2023 in #🙋|general-help
Remove google recaptcha from login modal
Only remove google recaptcha from login modal
11 replies