Remove "/shop"
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!
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Remove "/shop"
Hi,
I want to remove the "/shop" path from the routes "/{site}/shop" and make it just "/{site}"; which works perfectly if I remove it from routes in shop config. But I also have other pages for example: "/about-us" which throws an exception -- about-us is being taken as site-code.
Here's my route array on shop config
What am I missing here? I have tried statically configuring the default prefix, overwriting the aimeos shop routes and the both solution has it's flaws and errors.
_______
Laravel 8 with Aimeos 2021.10 + Marketplace. Setup via composer. Mac with Valet and MySql 8.0.25
I want to remove the "/shop" path from the routes "/{site}/shop" and make it just "/{site}"; which works perfectly if I remove it from routes in shop config. But I also have other pages for example: "/about-us" which throws an exception -- about-us is being taken as site-code.
Code: Select all
No item found for conditions: Array ( [locale.site.code] => about-us )
Code: Select all
'routes' => [
'jsonapi' => ['prefix' => '{site}/jsonapi', 'middleware' => ['web', 'api']],
'account' => ['prefix' => '{site}/profile', 'middleware' => ['web', 'auth']],
'default' => ['prefix' => '{site}', 'middleware' => ['web']],
],
_______
Laravel 8 with Aimeos 2021.10 + Marketplace. Setup via composer. Mac with Valet and MySql 8.0.25
Re: Remove "/shop"
The Laravel routes which matches "/about-us" must be before the route for "/{site}". If "/about-us" should be matched dynamically by "/{page}", then it's impossible to define a routing that will work.
One option is to use a subdomain or custom domain for "{site}" so "{page}" can match all non-matched URLs at the end.
One option is to use a subdomain or custom domain for "{site}" so "{page}" can match all non-matched URLs at the end.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,

Re: Remove "/shop"
"/about-us" is basically a static page with a custom route that is already on the top of the routes on routes/web.php file. Or am I missing something?
Re: Remove "/shop"
Laravel doesn't support ordering routes very well and the only way to be sure that the correct route is used is to make it the only one matching that URL.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,
