Multiple sites frontend Not displaying (only default site is displayed)

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
chemwen0
Posts: 3
Joined: 18 Apr 2020, 03:30

Multiple sites frontend Not displaying (only default site is displayed)

Post by chemwen0 » 18 Apr 2020, 03:39

Hi, I created a multivendor shop with the Aimeos Laravel shop, however, only the default or rather the first site I created has its products displayed on the frontend. The other sites have the products being added to the products table but are not displayed. All the products have categories. I tried clearing cache and rebuilding the index and even resaving items in the sites but none of these options have helped in any way. What am I not doing right?

I'm using Laravel 6.18.6, php 7.4.3 and aimeos/aimeos-laravel: ~2020.04 on windows os

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

Re: Multiple sites frontend Not displaying (only default site is displayed)

Post by aimeos » 19 Apr 2020, 07:54

Did you configure your routes for multiple shops?
https://aimeos.org/docs/Laravel/Configu ... iple_shops
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

chemwen0
Posts: 3
Joined: 18 Apr 2020, 03:30

Re: Multiple sites frontend Not displaying (only default site is displayed)

Post by chemwen0 » 25 Apr 2020, 03:01

Yes I configured. however, I noticed that the different shops were accessed from different URLs thus was able to access the sites eventually. Thank you

albcamargo61
Posts: 3
Joined: 20 May 2020, 11:04

Re: Multiple sites frontend Not displaying (only default site is displayed)

Post by albcamargo61 » 20 May 2020, 11:08

Did you solve this issue? I have the same problem.

albcamargo61
Posts: 3
Joined: 20 May 2020, 11:04

Re: Multiple sites frontend Not displaying (only default site is displayed)

Post by albcamargo61 » 21 May 2020, 13:32

Does any one have a solution? I'm stucked.

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

Re: Multiple sites frontend Not displaying (only default site is displayed)

Post by aimeos » 22 May 2020, 07:19

Can you please post your shop/config.php file (without credentials) and the output of "php artisan route:list"?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

albcamargo61
Posts: 3
Joined: 20 May 2020, 11:04

Re: Multiple sites frontend Not displaying (only default site is displayed)

Post by albcamargo61 » 22 May 2020, 16:58

Thanks.
My env:
Linux version 4.15.0-101-generic (buildd@lgw01-amd64-003) (gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)) #102-Ubuntu
PHP 7.2.24-0ubuntu0.18.04.4 (cli) (built: Apr 8 2020 15:45:57) ( NTS )
Laravel Framework 6.18.14

URL: biioh.co

My shop.php
-------
<?php

return [

'apc_enabled' => false, // enable for maximum performance if APCu is availalbe
'apc_prefix' => 'aimeos:', // prefix for caching config and translation in APCu
'pcntl_max' => 4, // maximum number of parallel command line processes when starting jobs

'routes' => [
'jsonapi' => ['prefix' => 'colanta/jsonapi', 'middleware' => ['web', 'api']],
'account' => ['prefix' => 'colanta/profile', 'middleware' => ['web', 'auth']],
'colanta' => ['prefix' => 'colanta', 'middleware' => ['web']],
],


'page' => [
'account-index' => [ 'account/profile','account/subscription','account/history','account/favorite','account/watch','basket/mini','catalog/session','locale/select' ],
'basket-index' => [ 'basket/bulk', 'basket/standard','basket/related' ],
'catalog-count' => [ 'catalog/count' ],
'catalog-detail' => [ 'basket/mini','catalog/stage','catalog/detail','catalog/session','locale/select' ],
'catalog-list' => [ 'basket/mini','catalog/filter','catalog/stage','catalog/lists','locale/select' ],
'catalog-stock' => [ 'catalog/stock' ],
'catalog-suggest' => [ 'catalog/suggest' ],
'catalog-tree' => [ 'basket/mini','catalog/filter','catalog/stage','catalog/lists' ],
'checkout-confirm' => [ 'checkout/confirm' ],
'checkout-index' => [ 'checkout/standard' ],
'checkout-update' => [ 'checkout/update' ],
],


/*
'resource' => [
'db' => [
'adapter' => config('database.connections.mysql.driver', 'mysql'),
'host' => config('database.connections.mysql.host', '127.0.0.1'),
'port' => config('database.connections.mysql.port', '3306'),
'socket' => config('database.connections.mysql.unix_socket', ''),
'database' => config('database.connections.mysql.database', 'forge'),
'username' => config('database.connections.mysql.username', 'forge'),
'password' => config('database.connections.mysql.password', ''),
'stmt' => ["SET SESSION sort_buffer_size=2097144; SET NAMES 'utf8mb4'; SET SESSION sql_mode='ANSI'"],
'limit' => 3, // maximum number of concurrent database connections
'defaultTableOptions' => [
'charset' => config('database.connections.mysql.charset'),
'collate' => config('database.connections.mysql.collation'),
],
],
],
*/
//acamargo
//To show products from all sites in the frontend, you have to add this to your Laravel ./config/shop.php:
/*
'frontend' => array(
'mshop' => array(
'common' => array(
'manager' => array(
'sitecheck' => 0
),
),
),
),

-----------*/
'admin' => [],

'client' => [
'html' => [
'basket' => [
'cache' => [
// 'enable' => false, // Disable basket content caching for development
],
],
'catalog' => [
'selection' => [
'type' => [
'color' => 'radio',
'length' => 'radio',
'width' => 'radio',
],
],
],
],
],

'controller' => [
],

'i18n' => [
],

'madmin' => [
'cache' => [
'manager' => [
// 'name' => 'None', // Disable caching for development
],
],
'log' => [
'manager' => [
'standard' => [
// 'loglevel' => 7, // Enable debug logging into madmin_log table
],
],
],
],

'mshop' => [
],


'command' => [
],

'frontend' => [
],

'backend' => [
],

];

And the output of "php artisan route:list"
-----------
+------------------------------------------------------------------------+--------------+
| Domain | Method | URI | Name | Action | Middleware |
+--------+---------------+---------------------------------------------------------------------+------------------------------+------------------------------------------------------------------------+--------------+
| | GET|HEAD | / | | Closure | web |
| | GET|HEAD | admin | aimeos_shop_admin | Aimeos\Shop\Controller\AdminController@indexAction | web |
| | GET|POST|HEAD | admin/{site}/jqadm/copy/{resource}/{id} | aimeos_shop_jqadm_copy | Aimeos\Shop\Controller\JqadmController@copyAction | web,auth |
| | GET|POST|HEAD | admin/{site}/jqadm/create/{resource} | aimeos_shop_jqadm_create | Aimeos\Shop\Controller\JqadmController@createAction | web,auth |
| | GET|POST|HEAD | admin/{site}/jqadm/delete/{resource}/{id?} | aimeos_shop_jqadm_delete | Aimeos\Shop\Controller\JqadmController@deleteAction | web,auth |
| | GET|POST|HEAD | admin/{site}/jqadm/export/{resource} | aimeos_shop_jqadm_export | Aimeos\Shop\Controller\JqadmController@exportAction | web,auth |
| | GET|HEAD | admin/{site}/jqadm/file/{type} | aimeos_shop_jqadm_file | Aimeos\Shop\Controller\JqadmController@fileAction | web,auth |
| | GET|HEAD | admin/{site}/jqadm/get/{resource}/{id} | aimeos_shop_jqadm_get | Aimeos\Shop\Controller\JqadmController@getAction | web,auth |
| | POST | admin/{site}/jqadm/save/{resource} | aimeos_shop_jqadm_save | Aimeos\Shop\Controller\JqadmController@saveAction | web,auth |
| | GET|POST|HEAD | admin/{site}/jqadm/search/{resource} | aimeos_shop_jqadm_search | Aimeos\Shop\Controller\JqadmController@searchAction | web,auth |
| | OPTIONS | admin/{site}/jsonadm/{resource?} | aimeos_shop_jsonadm_options | Aimeos\Shop\Controller\JsonadmController@optionsAction | web,auth |
| | PUT | admin/{site}/jsonadm/{resource}/{id?} | aimeos_shop_jsonadm_put | Aimeos\Shop\Controller\JsonadmController@putAction | web,auth |
| | POST | admin/{site}/jsonadm/{resource}/{id?} | aimeos_shop_jsonadm_post | Aimeos\Shop\Controller\JsonadmController@postAction | web,auth |
| | PATCH | admin/{site}/jsonadm/{resource}/{id?} | aimeos_shop_jsonadm_patch | Aimeos\Shop\Controller\JsonadmController@patchAction | web,auth |
| | GET|HEAD | admin/{site}/jsonadm/{resource}/{id?} | aimeos_shop_jsonadm_get | Aimeos\Shop\Controller\JsonadmController@getAction | web,auth |
| | DELETE | admin/{site}/jsonadm/{resource}/{id?} | aimeos_shop_jsonadm_delete | Aimeos\Shop\Controller\JsonadmController@deleteAction | web,auth |
| | GET|HEAD | api/user | | Closure | api,auth:api |
| | OPTIONS | colanta/jsonapi/{resource?} | aimeos_shop_jsonapi_options | Aimeos\Shop\Controller\JsonapiController@optionsAction | web,api |
| | DELETE | colanta/jsonapi/{resource} | aimeos_shop_jsonapi_delete | Aimeos\Shop\Controller\JsonapiController@deleteAction | web,api |
| | GET|HEAD | colanta/jsonapi/{resource} | aimeos_shop_jsonapi_get | Aimeos\Shop\Controller\JsonapiController@getAction | web,api |
| | POST | colanta/jsonapi/{resource} | aimeos_shop_jsonapi_post | Aimeos\Shop\Controller\JsonapiController@postAction | web,api |
| | PUT | colanta/jsonapi/{resource} | aimeos_shop_jsonapi_put | Aimeos\Shop\Controller\JsonapiController@putAction | web,api |
| | PATCH | colanta/jsonapi/{resource} | aimeos_shop_jsonapi_patch | Aimeos\Shop\Controller\JsonapiController@patchAction | web,api |
| | GET|POST|HEAD | colanta/profile | aimeos_shop_account | Aimeos\Shop\Controller\AccountController@indexAction | web,auth |
| | GET|POST|HEAD | colanta/profile/download/{dl_id} | aimeos_shop_account_download | Aimeos\Shop\Controller\AccountController@downloadAction | web,auth |
| | GET|POST|HEAD | colanta/profile/favorite/{fav_action?}/{fav_id?}/{d_name?}/{d_pos?} | aimeos_shop_account_favorite | Aimeos\Shop\Controller\AccountController@indexAction | web,auth |
| | GET|POST|HEAD | colanta/profile/watch/{wat_action?}/{wat_id?}/{d_name?}/{d_pos?} | aimeos_shop_account_watch | Aimeos\Shop\Controller\AccountController@indexAction | web,auth |
| | GET|HEAD | home | home | App\Http\Controllers\HomeController@index | web,auth |
| | GET|HEAD | login | login | App\Http\Controllers\Auth\LoginController@showLoginForm | web,guest |
| | POST | login | | App\Http\Controllers\Auth\LoginController@login | web,guest |
| | POST | logout | logout | App\Http\Controllers\Auth\LoginController@logout | web |
| | POST | password/confirm | | App\Http\Controllers\Auth\ConfirmPasswordController@confirm | web,auth |
| | GET|HEAD | password/confirm | password.confirm | App\Http\Controllers\Auth\ConfirmPasswordController@showConfirmForm | web,auth |
| | POST | password/email | password.email | App\Http\Controllers\Auth\ForgotPasswordController@sendResetLinkEmail | web |
| | POST | password/reset | password.update | App\Http\Controllers\Auth\ResetPasswordController@reset | web |
| | GET|HEAD | password/reset | password.request | App\Http\Controllers\Auth\ForgotPasswordController@showLinkRequestForm | web |
| | GET|HEAD | password/reset/{token} | password.reset | App\Http\Controllers\Auth\ResetPasswordController@showResetForm | web |
| | GET|HEAD | privacy | aimeos_shop_privacy | Aimeos\Shop\Controller\PageController@privacyAction | |
| | POST | register | | App\Http\Controllers\Auth\RegisterController@register | web,guest |
| | GET|HEAD | register | register | App\Http\Controllers\Auth\RegisterController@showRegistrationForm | web,guest |
| | GET|POST|HEAD | shop | aimeos_shop_list | Aimeos\Shop\Controller\CatalogController@listAction | web |
| | GET|POST|HEAD | shop/basket | aimeos_shop_basket | Aimeos\Shop\Controller\BasketController@indexAction | web |
| | GET|POST|HEAD | shop/checkout/{c_step?} | aimeos_shop_checkout | Aimeos\Shop\Controller\CheckoutController@indexAction | web |
| | GET|POST|HEAD | shop/confirm/{code?} | aimeos_shop_confirm | Aimeos\Shop\Controller\CheckoutController@confirmAction | web |
| | GET|POST|HEAD | shop/count | aimeos_shop_count | Aimeos\Shop\Controller\CatalogController@countAction | web |
| | GET|POST|HEAD | shop/pin/{pin_action}/{pin_id}/{d_name} | aimeos_shop_session_pinned | Aimeos\Shop\Controller\CatalogController@detailAction | web |
| | GET|POST|HEAD | shop/stock | aimeos_shop_stock | Aimeos\Shop\Controller\CatalogController@stockAction | web |
| | GET|POST|HEAD | shop/suggest | aimeos_shop_suggest | Aimeos\Shop\Controller\CatalogController@suggestAction | web |
| | GET|POST|HEAD | shop/{d_name}/{d_pos?}/{d_prodid?} | aimeos_shop_detail | Aimeos\Shop\Controller\CatalogController@detailAction | web |
| | GET|POST|HEAD | shop/{f_name}~{f_catid} | aimeos_shop_tree | Aimeos\Shop\Controller\CatalogController@treeAction | web |
| | GET|HEAD | terms | aimeos_shop_terms | Aimeos\Shop\Controller\PageController@termsAction | |
| | GET|POST|HEAD | update | aimeos_shop_update | Aimeos\Shop\Controller\CheckoutController@updateAction | |
+--------+---------------+---------------------------------------------------------------------+-----------------------------
Last edited by albcamargo61 on 22 May 2020, 17:13, edited 1 time in total.

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

Re: Multiple sites frontend Not displaying (only default site is displayed)

Post by aimeos » 22 May 2020, 17:05

You don't have your installation configured for multiple sites:
https://aimeos.org/docs/Laravel/Configu ... iple_shops

Your "routes" section in your ./config/shop.php file must at least look like:

Code: Select all

'routes' => [
	'jsonapi' => ['prefix' => '{site}/jsonapi', 'middleware' => ['web', 'api']],
	'account' => ['prefix' => '{site}/profile', 'middleware' => ['web', 'auth']],
	'default' => ['prefix' => '{site}/shop', 'middleware' => ['web']]
],
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply