Change the main directory
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!
Change the main directory
Hi all!
I have just installed this ecommerce package and it seems to work well for us
.
Just a (maybe a bit silly) question on changing the root of the shop. The demo has the root set to 'public', but we would like to change this to 'public/shop'. ie. the list url would be localhost/shop/list, admin would be 'localhost/shop/admin' etc.
When changing the routes this works, but when clicking on any link on a page, the '/shop' extension is ignored.
Is there an easy way of doing this?
Cheers, Dave
I have just installed this ecommerce package and it seems to work well for us

Just a (maybe a bit silly) question on changing the root of the shop. The demo has the root set to 'public', but we would like to change this to 'public/shop'. ie. the list url would be localhost/shop/list, admin would be 'localhost/shop/admin' etc.
When changing the routes this works, but when clicking on any link on a page, the '/shop' extension is ignored.
Is there an easy way of doing this?
Cheers, Dave
System info:
Running Aimeos Laravel: 2022.10
Laravel Framework 9.52
Almalinux
PHP 8.1
Re: Change the main directory
Please clear the content cache to recreate the cached HTML:
Then the links will be as expected.
Code: Select all
php artisan aimeos:cache
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,

Re: Change the main directory
Thanks for the speedy response. I have cleared the cache, but still have the same problem.
I just want to change the base of all shop url's to be 'public/shop' instead of 'public' (so not have the shop in the root of the website). I assumed the base url Aimeos can be changed somewhere in the configuration. But I do not know where.
As I changed the routes, 'localhost/shop/list' now brings up the list of product, but when I click on a link, the 'shop' is left out of the url. For example:
When clicking on a demo product from the list page, the requested url is:
'http://localhost/detail/13/Demo_article/0'
instead of
'http://localhost/shop/detail/13/Demo_article/0'
Thanks.
I just want to change the base of all shop url's to be 'public/shop' instead of 'public' (so not have the shop in the root of the website). I assumed the base url Aimeos can be changed somewhere in the configuration. But I do not know where.
As I changed the routes, 'localhost/shop/list' now brings up the list of product, but when I click on a link, the 'shop' is left out of the url. For example:
When clicking on a demo product from the list page, the requested url is:
'http://localhost/detail/13/Demo_article/0'
instead of
'http://localhost/shop/detail/13/Demo_article/0'
Thanks.
System info:
Running Aimeos Laravel: 2022.10
Laravel Framework 9.52
Almalinux
PHP 8.1
Re: Change the main directory
Can you please post your changes you've done to use the prefix and the list of routes?
Code: Select all
php artisan route:list
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,

Re: Change the main directory
Just found the problem. In the Aimos directory there were still some routes without the 'shop' in the path. Found it with your suggested the artisan command.
All is working well now.
Thanks!
All is working well now.
Thanks!
System info:
Running Aimeos Laravel: 2022.10
Laravel Framework 9.52
Almalinux
PHP 8.1