0

We want to create the following setup:

Main Web Site (code: store) -> Store BE (code: store-be) -> Store View NL (code: nl)
Main Web Site (code: store) -> Store BE (code: store-be) -> Store View EN (code: en)
Main Web Site (code: store) -> Store NL (code: store-nl) -> Store View NL (code: nl)
Main Web Site (code: store) -> Store NL (code: store-nl) -> Store View EN (code: en)

Both stores, do have their own domain (.be and .nl) and we want for both domains the English language as store code for URL /en/.

Problem now is that it is not possible to create multiple store views with the same code.

How can we still achieve what we want, is there a workaround for this? So we get the following:

example.nl/en/
example.be/en/
1
  • By any chance, could you use a store_code like "en_nl" and "en_be" ?
    – Cladiuss
    Commented Jun 26, 2023 at 13:41

2 Answers 2

1

You can try this method

  1. Create multiple store view with different codes
  2. Hide store code from URL(You can do this from admin)
  3. Add base URL from admin for store wise
  4. Create anoher directory in Magento root dir. and domain point this dir.
  5. Create simlinks for the dir.

Link : https://www.integerbyteblog.in/magento/setup-multi-website-in-magento-2/

I think this will help you.

0
1

You can not use the same-store code for a new store view. And I recommend to do not remove magento default validation for it.The Store code must be unique in Magento. Also, there are many dependencies of code and validation.

I suggest creating a folder in pub/en and pub/nl. And make these folders act as the document root for specific store views.

Reference Link :

  1. Multi-website multi-store set-up

  2. https://magento.stackexchange.com/a/360476/82670

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.