Where to get Categories List from Databse
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!
-
- Posts: 40
- Joined: 02 Dec 2021, 17:18
Where to get Categories List from Databse
I need to display all the categories (specifically subcategories of HOME category) in one html page and need to create a hyperlink to each category, which redirects me to page where I can view products under that category; kindly let me know what flow that I need to follow to achieve this...
Laravel V : 8.4
Aimeos : 2021.10.*
PHP v: 7.3
Paltform : Windows 11
Laravel V : 8.4
Aimeos : 2021.10.*
PHP v: 7.3
Paltform : Windows 11
Re: Where to get Categories List from Databse
You can either use the catalog/filter component in your page like done here:
- https://github.com/aimeos/aimeos-larave ... op.php#L30
- https://github.com/aimeos/aimeos-larave ... ade.php#L7
- https://github.com/aimeos/aimeos-larave ... de.php#L18
Another option is to use the Aimeos Catalog frontend controller class in an own Laravel controller to retrieve the categories:
The available methods are described here:
https://github.com/aimeos/ai-controller ... /Iface.php
- https://github.com/aimeos/aimeos-larave ... op.php#L30
- https://github.com/aimeos/aimeos-larave ... ade.php#L7
- https://github.com/aimeos/aimeos-larave ... de.php#L18
Another option is to use the Aimeos Catalog frontend controller class in an own Laravel controller to retrieve the categories:
Code: Select all
$tree = \Aimeos\Controller\Frontend::create( app( 'aimeos.context' )->get(), 'catalog' )->getTree();
https://github.com/aimeos/ai-controller ... /Iface.php
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star