Issue at multi site's creation

How to configure and adapt Aimeos based shops as developer
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
mohan
Posts: 3
Joined: 02 Sep 2024, 07:28

Issue at multi site's creation

Post by mohan » 02 Sep 2024, 07:37

I am using Ubuntu 20.04.6 LTS with PHP 8.1

I have followed all the steps outlined in the Aimeos documentation for customizing multiple shops (https://aimeos.org/docs/latest/laravel/ ... iple-shops), available at this link. I successfully created a site named "site1" and set up the admin credentials, which work fine. However, when I attempt to access the frontend at https://mydomain/site1, I receive the error "Locale item for site 'site1' not found," and when trying https://mydomain/site1/shop, I get a 404 error. Could you provide a detailed explanation on how to properly create and access multiple sites in Aimeos?

User avatar
aimeos
Administrator
Posts: 8378
Joined: 01 Jan 1970, 00:00

Re: Issue at multi site's creation

Post by aimeos » 03 Sep 2024, 18:57

In the backend, go to the Locale > Locale panel and add the language/currency combination that should be allowed for that site: https://aimeos.org/docs/latest/manual/locales/
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

mohan
Posts: 3
Joined: 02 Sep 2024, 07:28

Re: Issue at multi site's creation

Post by mohan » 04 Sep 2024, 05:06

Thank you. I have set up multi-site routing using subdomains with the following configurations:

Main Domain: aimeos.selldesk.in
Subdomain: aimeos1.selldesk.in
I created a site named 'aimeos1' and added the following configurations:

In config/shop.php:
'routes' => [
'admin' => ['domain' => '{site}.yourdomain.com', 'prefix' => 'admin', 'middleware' => ['web']],
'jqadm' => ['domain' => '{site}.yourdomain.com', 'prefix' => 'admin/jqadm', 'middleware' => ['web', 'auth']],
'graphql' => ['domain' => '{site}.yourdomain.com', 'prefix' => 'admin/graphql', 'middleware' => ['web', 'auth']],
'jsonadm' => ['domain' => '{site}.yourdomain.com', 'prefix' => 'admin/jsonadm', 'middleware' => ['web', 'auth']],
'jsonapi' => ['domain' => '{site}.yourdomain.com', 'prefix' => 'jsonapi', 'middleware' => ['web', 'api']],
'account' => ['domain' => '{site}.yourdomain.com', 'prefix' => 'profile', 'middleware' => ['web', 'auth']],
'default' => ['domain' => '{site}.yourdomain.com', 'prefix' => 'shop', 'middleware' => ['web']],
'update' => ['domain' => '{site}.yourdomain.com'],
],

In routes/web.php:
Route::group(['domain' => '{site}.yourdomain.com', 'middleware' => ['web']], function () {
Route::get('/', '\Aimeos\Shop\Controller\CatalogController@homeAction')
->name('aimeos_home')->where(['site' => '[a-z0-9\-]+']);
});

Is there anything else that needs to be done? because while loading aimeos1.selldesk.in its loading the default site?

User avatar
aimeos
Administrator
Posts: 8378
Joined: 01 Jan 1970, 00:00

Re: Issue at multi site's creation

Post by aimeos » 09 Sep 2024, 07:39

If you run "php artisan aimeos:setup --option=setup/default/demo:1 aimeos1.selldesk.in", than the home page of aimeos1.selldesk.in contains the same data as the default home page but it's just a copy. Change the content of the aimeos1.selldesk.in home page to see if there are any changes.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply