Missing Required Parameter for Route: aimeos_shop_account - URI: {site}/profile

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
hussain.h.ff32
Posts: 4
Joined: 10 Apr 2025, 00:37

Missing Required Parameter for Route: aimeos_shop_account - URI: {site}/profile

Post by hussain.h.ff32 » 10 Apr 2025, 01:21

Issue:

I'm encountering the following error on my Laravel 12.8.1 application with Aimeos 2024 and PHP 8.4.2:

Missing required parameter for [Route: aimeos_shop_account] [URI: {site}/profile] [Missing parameter: site].

I followed the Aimeos documentation for multi-shop configuration and tried setting up the routes as shown below:

use App\Http\Controllers\ProfileController;
use Illuminate\Support\Facades\Route;

Route::get("/", function () {
return view("welcome");
});

Route::get("/dashboard", function () {
return view("dashboard");
})
->middleware(["auth", "verified"])
->name("dashboard");

Route::middleware("auth")->group(function () {
Route::get("{site}/profile", [ProfileController::class, "edit"])->name("aimeos_shop_account");
Route::patch("{site}/profile", [ProfileController::class, "update"])->name("profile.update");
Route::delete("{site}/profile", [ProfileController::class, "destroy"])->name("profile.destroy");
});

require __DIR__ . "/auth.php";

Route::group(["middleware" => ["web"]], function () {
Route::get("/", "\Aimeos\Shop\Controller\CatalogController@homeAction")->name("aimeos_home");
});

Route::get("/{site?}", function ($site = "default") {
request()->merge(["site" => $site]);
return app(\Aimeos\Shop\Controller\CatalogController::class)->homeAction();
})->where("site", "[a-zA-Z0-9_-]+");

'routes' => [
'jsonapi' => ['prefix' => '{site}/jsonapi', 'middleware' => ['web', 'api']],
'account' => ['prefix' => '{site}/profile', 'middleware' => ['web', 'auth']],
'default' => ['prefix' => '{site}/shop', 'middleware' => ['web']]
];

Environment Details:

Laravel Version: 12.8.1

PHP Version: 8.4.2

Aimeos Version: 2024

Operating System: Linux


I followed the multi-shop setup in the documentation, but I keep getting the "Missing required parameter: site" error when trying to access the profile route for the shop.

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

Re: Missing Required Parameter for Route: aimeos_shop_account - URI: {site}/profile

Post by aimeos » 10 Apr 2025, 07:32

The Aimeos shop distribution is already prepared for multi-site setups:
https://github.com/aimeos/#installation

If you need to integrate Aimeos into an existing application and add multi-tenancy, please have a look here:
- https://github.com/aimeos/aimeos/blob/m ... hp#L49-L54
- https://github.com/aimeos/aimeos/blob/m ... php#L8-L21
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

hussain.h.ff32
Posts: 4
Joined: 10 Apr 2025, 00:37

Re: Missing Required Parameter for Route: aimeos_shop_account - URI: {site}/profile

Post by hussain.h.ff32 » 10 Apr 2025, 18:29

Am using laravel package are you able to help me to fix this issue is there a way to fix it !

Thanks

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

Re: Missing Required Parameter for Route: aimeos_shop_account - URI: {site}/profile

Post by aimeos » 11 Apr 2025, 07:21

Your routes are wrong, please have a look at the links.
Also, you have to use airoute() instead of route() in all your templates.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

hussain.h.ff32
Posts: 4
Joined: 10 Apr 2025, 00:37

Re: Missing Required Parameter for Route: aimeos_shop_account - URI: {site}/profile

Post by hussain.h.ff32 » 15 Apr 2025, 12:07

I've listened to your advice and used the quick installation for aimeos but am facing many issues 😮‍💨 first of all I've enabled the multiple shop and local and I have the default shop also I've created seller as well I've followed all of the instructions but now I cannot access the admin panel Illuminate
 \ 
Routing
 \ 
Exceptions
 \ 
UrlGenerationException
PHP 8.2.28
12.8.1
Missing required parameter for [Route: login] [URI: {locale}/{site}/login] [Missing parameter: locale].

<?php
$multishop = $multiroute = [];
$prefix = env('SHOP_MULTILOCALE') ? '{locale}/' : '';

if (env('SHOP_MULTISHOP')) {
$multishop = ['routes' => [
'admin' => ['prefix' => 'admin', 'middleware' => ['web', 'auth', 'verified']],
'jqadm' => ['prefix' => 'admin/{site}/jqadm', 'middleware' => ['web', 'auth', 'verified']],
'graphql' => ['prefix' => 'admin/{site}/graphql', 'middleware' => ['web', 'auth', 'verified']],
'jsonadm' => ['prefix' => 'admin/{site}/jsonadm', 'middleware' => ['web', 'auth', 'verified']],
'jsonapi' => ['prefix' => '{site}/jsonapi', 'middleware' => ['web', 'api']],
'account' => ['prefix' => $prefix . '{site}/profile', 'middleware' => ['web', 'auth', 'verified']],
'default' => ['prefix' => $prefix . '{site}/shop', 'middleware' => ['web']],
'basket' => ['prefix' => $prefix . '{site}/shop', 'middleware' => ['web']],
'checkout' => ['prefix' => $prefix . '{site}/shop', 'middleware' => ['web']],
'confirm' => ['prefix' => $prefix . '{site}/shop', 'middleware' => ['web']],
'supplier' => ['prefix' => $prefix . '{site}/s', 'middleware' => ['web']],
'page' => ['prefix' => $prefix . '{site}/p', 'middleware' => ['web']],
'home' => ['prefix' => $prefix . '{site}', 'middleware' => ['web']],
'update' => ['prefix' => '{site}'],
]];
}

return array_replace_recursive($multiroute, $multishop + [
'apc_enabled' => false,
'apc_prefix' => 'aimeos:',
'num_formatter' => 'Locale',
'pcntl_max' => 4,
'version' => env('APP_VERSION', 1),
'roles' => ['admin', 'editor', 'super'],
'panel' => 'dashboard',

'admin' => [
'jqadm' => [
'site' => [
'groups' => ['admin', 'super'], // groups allowed to change site
],
'resource' => [
'site' => [
'groups' => ['admin', 'super','editor'], // groups allowed to change site
],
],
],
],

'site' => [
'default' => [
'locale' => [
'language' => 'en',
'currency' => 'USD',
],
'theme' => 'default',
],
'seller' => [
'locale' => [
'language' => ['en', 'ar'],
'currency' => ['USD', 'EUR'],
],
'theme' => 'site1',
],
// Add more sites as needed
],

'routes' => [
'admin' => ['prefix' => 'admin', 'middleware' => ['web', 'auth', 'verified']],
'jqadm' => ['prefix' => 'admin/{site}/jqadm', 'middleware' => ['web', 'auth', 'verified']],
'graphql' => ['prefix' => 'admin/{site}/graphql', 'middleware' => ['web', 'auth', 'verified']],
'jsonadm' => ['prefix' => 'admin/{site}/jsonadm', 'middleware' => ['web', 'auth', 'verified']],
'jsonapi' => ['prefix' => 'jsonapi', 'middleware' => ['web', 'api']],
'account' => ['prefix' => $prefix . 'profile', 'middleware' => ['web', 'auth']],
'default' => ['prefix' => $prefix . 'shop', 'middleware' => ['web']],
'basket' => ['prefix' => $prefix . 'shop', 'middleware' => ['web']],
'checkout' => ['prefix' => $prefix . 'shop', 'middleware' => ['web']],
'confirm' => ['prefix' => $prefix . 'shop', 'middleware' => ['web']],
'supplier' => ['prefix' => $prefix . 's', 'middleware' => ['web']],
'page' => ['prefix' => $prefix . 'p', 'middleware' => ['web']],
'home' => ['prefix' => $prefix, 'middleware' => ['web']],
'update' => [],
'where' => [
'site' => '[A-Za-z0-9\.\-]+',
'locale' => '[a-z]{2}(\_[A-Z]{2})?',
],
],

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

'resource' => [
'db' => [
'adapter' => config('database.connections.' . config('database.default', 'mysql') . '.driver', 'mysql'),
'host' => config('database.connections.' . config('database.default', 'mysql') . '.host', '127.0.0.1'),
'port' => config('database.connections.' . config('database.default', 'mysql') . '.port', '3306'),
'socket' => config('database.connections.' . config('database.default', 'mysql') . '.unix_socket', ''),
'database' => config('database.connections.' . config('database.default', 'mysql') . '.database', 'forge'),
'username' => config('database.connections.' . config('database.default', 'mysql') . '.username', 'forge'),
'password' => config('database.connections.' . config('database.default', 'mysql') . '.password', ''),
'stmt' => config('database.default', 'mysql') === 'mysql' ? ["SET SESSION sort_buffer_size=2097144; SET NAMES 'utf8mb4'; SET SESSION sql_mode='ANSI'"] : [],
'limit' => 3,
'defaultTableOptions' => [
'charset' => config('database.connections.' . config('database.default', 'mysql') . '.charset'),
'collate' => config('database.connections.' . config('database.default', 'mysql') . '.collation'),
],
'driverOptions' => config('database.connections.' . config('database.default', 'mysql') . '.options'),
],

'fs' => [
'adapter' => 'Standard',
'tempdir' => storage_path('tmp'),
'basedir' => public_path(),
'baseurl' => rtrim(env('ASSET_URL', PHP_SAPI == 'cli' ? env('APP_URL') : ''), '/'),
],

'fs-media' => [
'adapter' => 'Standard',
'tempdir' => storage_path('tmp'),
'basedir' => public_path('aimeos'),
'baseurl' => rtrim(env('ASSET_URL', PHP_SAPI == 'cli' ? env('APP_URL') : ''), '/') . '/aimeos',
],

'fs-mimeicon' => [
'adapter' => 'Standard',
'tempdir' => storage_path('tmp'),
'basedir' => public_path('vendor/shop/mimeicons'),
'baseurl' => rtrim(env('ASSET_URL', PHP_SAPI == 'cli' ? env('APP_URL') : ''), '/') . '/vendor/shop/mimeicons',
],

'fs-theme' => [
'adapter' => 'Standard',
'tempdir' => storage_path('tmp'),
'basedir' => public_path('vendor/shop/themes'),
'baseurl' => rtrim(env('ASSET_URL', PHP_SAPI == 'cli' ? env('APP_URL') : ''), '/') . '/vendor/shop/themes',
],
],

'admin' => [
'jqadm' => [
'url' => [
'copy' => ['target' => 'aimeos_shop_jqadm_copy'],
'create' => ['target' => 'aimeos_shop_jqadm_create'],
'delete' => ['target' => 'aimeos_shop_jqadm_delete'],
'export' => ['target' => 'aimeos_shop_jqadm_export'],
'get' => ['target' => 'aimeos_shop_jqadm_get'],
'import' => ['target' => 'aimeos_shop_jqadm_import'],
'save' => ['target' => 'aimeos_shop_jqadm_save'],
'search' => ['target' => 'aimeos_shop_jqadm_search'],
],
],
],

'client' => [
'html' => [
'basket' => [
'cache' => [
'enable' => true,
],
],
'common' => [
'cache' => [
'enable' => true,
],
],
'catalog' => [
'lists' => [
'cache' => [
'enable' => true,
],
],
],
],
],

'controller' => [
'common' => [
'media' => [
'standard' => [
'mimeicon' => [
'directory' => 'vendor/shop/mimeicons',
],
],
],
],
],

'madmin' => [
'cache' => [
'manager' => [
'name' => 'None', // Use 'Standard' for production

],
],
],

'mshop' => [
'locale' => [
'site' => env('SHOP_MULTISHOP', false),
],
],
]);
Here is the shop.php file please help am stack

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

Re: Missing Required Parameter for Route: aimeos_shop_account - URI: {site}/profile

Post by aimeos » 15 Apr 2025, 21:38

Please revert your ./config/shop.php to the original file of the Aimeos distribution. Almost all the changes you did are wrong causing the problems. For a multi-shop setup, you only need to adapt the SHOP_* settings in the .env file when using the Aimeos distribution.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply