Vue-storefront: Multistore: what if storecodes differ from urls

Created on 17 Jun 2020  路  1Comment  路  Source: DivanteLtd/vue-storefront

Is there any suggested way of configuring multistore where storecode does not follow the url?

For example:

  • store code 'au_en', url '/au'
  • store code 'en_us', url '/en-us'

At the moment this doesn't seem to work without me digging in the code and figuring out a workaround? Urls seem to be made of storecodes rather than using the url?

Thanks for any suggestions.

question

>All comments

@dio5 at this moment we're using storeCode as it's defined in the URL. Probably it could be taken from config.storeViews.storeCode instead so it would let you to override it. The other option is to run different VSF instances on different IP ports and then route the URLs on Nginx - you can set the X-VSF-Store-Code header via Nginx to mark the proper store code OR set it via ENV: https://github.com/DivanteLtd/vue-storefront/blob/dfdb9f5264d2ca08aaad7281843cd4eda643ef2b/core/scripts/utils/ssr-renderer.ts#L128

Was this page helpful?
0 / 5 - 0 ratings