Open insaurabh opened 5 years ago
Hi there, in the API the storeId is being taken from query parameter: https://github.com/DivanteLtd/vue-storefront-api/blob/d3d0e7892cd063bbd69e545f3f2b6fdd9843d524/src/api/product.js#L40
Frontend app is taking storeId from config: https://github.com/DivanteLtd/vue-storefront/blob/4b9f089c6eb732b0cf06191af80bdf3fb18a9bff/core/lib/multistore.ts#L87
... and then pass it ovet to the API as a query parameter: https://github.com/DivanteLtd/vue-storefront/blob/4b9f089c6eb732b0cf06191af80bdf3fb18a9bff/core/modules/catalog/store/product/actions.ts#L111
Thereof, you should change the store id in the config
if you have only one store please do change config.storeId
otherwise the config.storeViews.<your_store>.storeId
Hi @pkarw
I tried what you suggested, I changed in config files at the project root, even I hardcoded the store id in product.js still it hit the store_id =1.
It was the problem in mage2vs data import.
The process of data import was stuck when it gets a non-existing store id. For a temporary solution of this, I looked into mage2vuestorefront/src/config.js
in this file, it is using some environment variables.
I set MAGENTO_STORE_ID=2
(my store id) in environment variables, then it works perfectly.
Is it the correct way to solve the issues or still i am missing something.
Thank You.
Hi there! Are You sure the Vue-storefront-api
configuration file does contain the proper storeViews
section? Please take a look at: https://github.com/DivanteLtd/vue-storefront-api/blob/d7b6fe516eeb214615f54726fb382e72ff2cc34b/scripts/mage2vs.js#L93 - it’s setting exactly this ENV variable just before running magento2vuestorefront
? It was created very long time ago so I can miss something; please just try to debug this piece of vs-api code which is in charge of mage2vs import
I am trying to integrate with my Magento store.
Magento Version: 2.2.6 Node Version: 8.16 Yarn:1.17
In live Magento site, there is no store id 1. Currently, i have store id 2 and 3 only.
Still it hit &storeId=1¤cyCode=USD
I used cli
vsf init
I didn't change anything in config/local.json.
http://localhost/magento232/rest/V1/products-render-info?searchCriteria=&searchCriteria[filter_groups][0][filters][0][field]=sku&searchCriteria[filter_groups][0][filters][0][value]=24-MB01%2C24-MB04%2C24-MB03%2C24-MB05%2C24-MB06%2C24-MB02%2C24-UB02%2C24-WB01%2C24-WB02%2C24-WB05%2C24-WB06%2C24-WB03%2C24-WB07%2C24-WB04%2C24-UG06%2C24-UG07%2C24-UG04%2C24-UG02%2C24-UG05%2C24-UG01%2C24-WG084%2C24-WG088%2C24-UG03%2C24-WG081-gray%2C24-WG081-pink%2C24-WG081-blue%2C24-WG082-gray%2C24-WG082-pink%2C24-WG082-blue%2C24-WG083-gray%2C24-WG083-pink%2C24-WG083-blue%2C24-WG085%2C24-WG086%2C24-WG087%2C24-MG04%2C24-MG01%2C24-MG03%2C24-MG05%2C24-MG02%2C24-WG09%2C24-WG01%2C24-WG03%2C24-WG02%2C24-WG085_Group%2C240-LV04%2C240-LV05%2C240-LV06%2C240-LV07%2C240-LV08&searchCriteria[filter_groups][0][filters][0][condition_type]=in&storeId=1¤cyCode=USD
I installed a fresh magento 2.3.2 with two stores ( store id 1,2) Initially it worked all data is imported.Once i delete the store 1 and run the importer again i got the same error.
Is it a bug or I am missing something else.