What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

Hi again everyone, Has anyone done the multistore setup without using subdomains? As in, instead of

U03EDGXUTPH
U03EDGXUTPH Posts: 36 🧑🏻‍🚀 - Cadet
edited April 2023 in Help

Hi again everyone,
Has anyone done the multistore setup without using subdomains?
As in, instead of using the www.us.mystore.com/en and www.de.mystore.com/de we’d use www.mystore.com/en_US & www.mystore.com/en_DE
I see some vague explanations in a few comments in the vendor/spryker/router-extension/src/Spryker/Zed/RouterExtension/Dependency/Plugin/RouterEnhancerPluginInterface.php

* We need to allow projects to use optional arguments in the URL e.g. `/{store}/{locale}/foo-bar`.
* The configured route will only have an URL like `/foo-bar` without the optional arguments but we need to be able
* to match an incoming route like `/de/de/foo-bar` to the configured one.

but then as soon as I’m importing products (urls are shared globally), or trying to login (the module is generating it’s own prefix), things go wrong.
I understand I can just split the shop to 3 databases, but I believe this would be overkill, and then would have to spend quite some time synchronizing every store’s catalog, cms, etc. So it’d be great if we can solve this in application runtime.
Am I missing something? Did anyone implement something like this?

Comments

  • giovanni.piemontese
    giovanni.piemontese Spryker Solution Partner Posts: 871 🧑🏻‍🚀 - Cadet

    did u tried to overwrite the unique key in spy_url where not url alone is unique but together with fk_locale? I remember that i solved smth so in the past..
    or I missunderstand your main problem?

  • U03EDGXUTPH
    U03EDGXUTPH Posts: 36 🧑🏻‍🚀 - Cadet
    edited April 2023

    @UL65CH0MC, yes, that could be an approach (pk is id+fk_locale) thanks! We were testing by overriding the Url Storage logic (save differently for each store, keep original in DB).
    Still, we’re running against certain places, like the login, where other logic seems to be used to generate the urls, so I’m wondering wether someone already did this, to have an idea of the roadblocks we’ll have to surpass 🙂