Search code examples
phpopencartopencart-3

Opencart: Multiple domains - one site / installation?


We have two domains: the .gr and the .com

But we want our opencart shop to be working on both of these domains with the same products/ layout/ settings but the language

Currently our opencart is installed at .gr and uses an alias domain for the .com.

But we want a different default language for the .com

And sure you can enter from the .com domain once you click any link for example a category link it redirects back to .gr because all links pont to .gr probably because .gr is set for the catalog url in the config

One solution is to make a second multistore entry with different catalog url and language setting but this will require to recreate the layout and the theme settings to our site and asign the products/categories to the new store and this can be mass-done from the database.

But in maintenance a change will need to be done in both stores

Is multistore the right way?

Do you have a more efficient way to mirror our site to the .com?

We use opencart v3.0.2.0

Thanks in advance!


Solution

  • Domain points to some folder on server, point both domains to that one folder with opencart installation.

    Now create two stores from the admin panel and in the url of store settings provide the exact url of both stores.

    Opencart matches the Current Url with store settings URL and displays the store. You can set different languages,themes and many other settings are separate for both stores, you can find those in store settings in admin panel .

    Products and other data will be shared.

    Even you can control if product / category needs to be shown on both or not.