Set Store using Magento sdk
Hello 🙂
I’m developing a storefront using Magento sdk and a fresh Nuxt 3 apps. I didn’t find how to set the store code to make calls to Magento ? For example when I do a simple: await shopSdk.magento.products({}) it only returns product from en_US store. How can I switch to get product from fr_FR or de_DE ?
Thanks a lot !
2 Replies
Nevermind, my front was on localhost and the middleware on 0.0.0.0, so the cookies weren't being shared 🥲
hi! since you mentioned cookies; I assume you probably know how to use them for vsf integrated with magento 2 using
vsf-customer
for customer. it will be a great help if you can help me implement that. Currently, I have resorted to useCockie()
composable from nuxt 3 and seems working fine.