Page 1 of 1

Aimeos routes

Posted: 23 Oct 2017, 19:30
by tkristis
Hi, I can't find aimeos routes.
Where are location of aimeos routes?

I'm using latest version of aimeos.

Thanks for help!

Re: Aimeos routes

Posted: 23 Oct 2017, 21:18
by aimeos

Re: Aimeos routes

Posted: 25 Oct 2017, 09:53
by tkristis
So if I want to change product listing page name instead "list" to "products" how I could do that?

Re: Aimeos routes

Posted: 25 Oct 2017, 10:25
by aimeos
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.

Re: Aimeos routes

Posted: 25 Oct 2017, 11:18
by tkristis
I get "CatalogController does not exist" error, but thanks I will try to figure it out.

Re: Aimeos routes

Posted: 30 Oct 2017, 11:32
by tkristis
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