Featured Products Listing On Home Page
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!
- bilginkilic
- Posts: 34
- Joined: 05 Jul 2020, 07:08
Featured Products Listing On Home Page
How to choose 5 products from the admin page and label them as a featured product of the month. After that, we want to fetch that 5 products to front end page? Which function to use to get those labeled products? Thank you.
@bilginkilic_ (twitter)
Re: Featured Products Listing On Home Page
You can assign your products as "promotion" products to the root category in the admin backend (rebuild the index afterwards) or add the root category in the "categories -> promotion" section of the product detail view.
The catalog list component does display these promotional products if your URL contains the f_catid parameter with the ID of the root category or if you set the root category as default category using this configuration:
https://aimeos.org/docs/Configuration/C ... id-default
You can also use the Catalog facade to retrieve those products from the database yourself and pass them to your own template:
https://github.com/aimeos/ai-controller ... ce.php#L51
The catalog list component does display these promotional products if your URL contains the f_catid parameter with the ID of the root category or if you set the root category as default category using this configuration:
https://aimeos.org/docs/Configuration/C ... id-default
You can also use the Catalog facade to retrieve those products from the database yourself and pass them to your own template:
Code: Select all
$items = \Aimeos\Shop\Facades\Product::uses(['text', 'media', 'price'])
->category(<catid>, 'promotion')->search();
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