Change the main directory

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!
IOU42
Posts: 26
Joined: 25 Jun 2016, 21:10

Change the main directory

Post by IOU42 » 25 Jun 2016, 21:22

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

System info:
Running Aimeos Laravel: 2022.10
Laravel Framework 9.52
Almalinux
PHP 8.1

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

Re: Change the main directory

Post by aimeos » 25 Jun 2016, 21:53

Please clear the content cache to recreate the cached HTML:

Code: Select all

php artisan aimeos:cache
Then the links will be as expected.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

IOU42
Posts: 26
Joined: 25 Jun 2016, 21:10

Re: Change the main directory

Post by IOU42 » 26 Jun 2016, 12:27

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.

System info:
Running Aimeos Laravel: 2022.10
Laravel Framework 9.52
Almalinux
PHP 8.1

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

Re: Change the main directory

Post by aimeos » 26 Jun 2016, 13:18

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, Image give us a star

IOU42
Posts: 26
Joined: 25 Jun 2016, 21:10

Re: Change the main directory

Post by IOU42 » 26 Jun 2016, 17:10

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!

System info:
Running Aimeos Laravel: 2022.10
Laravel Framework 9.52
Almalinux
PHP 8.1

Post Reply