Category Page

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!
VanCityDev
Posts: 8
Joined: 04 Jan 2020, 04:47

Category Page

Post by VanCityDev » 04 May 2020, 17:11

I want to show a page with just one category on it (ie: all products from one category).

I can do this below to pull the category page, but how do I specify the correct category? I can't figure out how to pass the category ID variable into it.

Code: Select all

Route::match( array( 'GET', 'POST' ), '/my-category/', array(
		'as' => 'aimeos_shop_catalog',
		'uses' => '\Aimeos\Shop\Controller\CatalogController@listAction'
	)
);

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

Re: Category Page

Post by aimeos » 06 May 2020, 07:27

You have to create your own controller and action with a copy of the catalog::list action. Then, set the category ID as default value in that action:

Code: Select all

$context->getConfig()->set( 'client/html/catalog/lists/catid-default', 123 );
See: https://aimeos.org/docs/Configuration/C ... id-default
and https://aimeos.org/docs/Laravel/Extend_Aimeos
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply