1

I want to setup magento 2 instance with below requirements in Magento 2.3 CE

1) Multiple countries option with country switcher

  • UAE/Dubai (default)
  • KSA/Saudi Arabia (This will further have below regions)
    • KSA Dammam
    • KSA Jeddah
    • KSA Riyadh
  • Kuwait

2) Multiple languages with language switcher

  • English (default)
  • Arabic

3) Multiple currency

  • AED (default)
  • SAR
  • KWD

4) Catalog different for each country, but there may be few common products

5) Catalog data will be uploaded for each language

6) Inventory will not be shared among countries

7) Customers will be shared across countries

8) URL should be as below

https://www.domain.com/uae/

https://www.domain.com/saudi/

9) If customers are shared, how will the cart and order process behave if the catalog is different in different countries

10) Auto redirection to country website with GeoIP redirection

With a bit of research I found that we can create multi website with same domain by creating a subfolder under root directory. Below are some of the links:

Magento 2: How to configure Nginx to use multiple websites with sub-folder - It is giving 404 error for category, product pages

https://gist.github.com/thagxt/0f605f0a8a95c79302db0d2f04383788

But I doubt if all the above requirements can be achieved?

Can this be achieved with multi-website OR multi-store configurations?

Kindly suggest the best approach possible and if above can be achieved with some 3rd party modules.

2 Answers 2

1

All the above requirements are achievable. I have created a website based on these requirements. The tough part is the Regions on Saudi Store. You need to have multi-website configuration.No modules 3rd Party Modules are required. Pingback if you want a detailed explanation. I will be glad to help you with this requirement.

1
  • Hi @prakash-tripathi, how did you achieve the above please? Commented Nov 14, 2022 at 10:49
0

As long as your base directory settings for the server are pointing at your pub directory such as public/pub you won't have issues in multi store in sub directories and .htaccess based store allocation.

Create a subdirectory and copy across the .htaccess and index.php from the pub directory

Add the following to the .htaccess

SetEnv MAGE_RUN_TYPE "store" SetEnv MAGE_RUN_CODE "STORE_CODE" RewriteBase /SUBDIRECTORY-NAME/ (This in the rewrite section further down the page) 

Update the index.php file to find the bootstap.php

require __DIR__ . '/../../app/bootstrap.php'; 

Then update your store URLS in Stores > Configuration > Web to be

https://www.domainname.com/SUBDIRECTORY-NAME/ 

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.