Aimeos routes

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!
tkristis
Posts: 12
Joined: 19 Oct 2017, 12:18

Aimeos routes

Post by tkristis » 23 Oct 2017, 19:30

Hi, I can't find aimeos routes.
Where are location of aimeos routes?

I'm using latest version of aimeos.

Thanks for help!

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

Re: Aimeos routes

Post by aimeos » 23 Oct 2017, 21:18

Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

tkristis
Posts: 12
Joined: 19 Oct 2017, 12:18

Re: Aimeos routes

Post by tkristis » 25 Oct 2017, 09:53

So if I want to change product listing page name instead "list" to "products" how I could do that?

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

Re: Aimeos routes

Post by aimeos » 25 Oct 2017, 10:25

Laravel allows you to overwrite routes in the routes/web.php file. Might be something like this:

Code: Select all

Route::group(config('shop.routes.default', ['middleware' => ['web']]), function() {
	Route::match( array( 'GET', 'POST' ), 'products', array(
		'as' => 'aimeos_shop_list',
		'uses' => 'Aimeos\Shop\Controller\CatalogController@listAction'
	));
});
But I'm not 100% sure. If this doesn't work, please ask in the Laravel forums for help.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

tkristis
Posts: 12
Joined: 19 Oct 2017, 12:18

Re: Aimeos routes

Post by tkristis » 25 Oct 2017, 11:18

I get "CatalogController does not exist" error, but thanks I will try to figure it out.

tkristis
Posts: 12
Joined: 19 Oct 2017, 12:18

Re: Aimeos routes

Post by tkristis » 30 Oct 2017, 11:32

I found a solution.

In config/app.php in the providers array put the service provider of the package before App\Providers\RouteServiceProvider::class, and then in your web.php routes you'll be able to override it with your custom route.

Also need to change route code and add slash.
Instead this:

Code: Select all

'uses' => 'Aimeos\Shop\Controller\CatalogController@listAction'
Do this:

Code: Select all

'uses' => '\Aimeos\Shop\Controller\CatalogController@listAction'
https://stackoverflow.com/questions/447 ... ckage?rq=1

Post Reply