How to get getRefItems('product') of bought together in catalog/detail?
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: 27
- Joined: 04 Jun 2020, 14:00
How to get getRefItems('product') of bought together in catalog/detail?
Hello, Aimeos.
My version is Laravel 2020.10.
Seems it is no way to get subproducts (or other) referenced items for bought together products on catalog detail? I need to get products on the "select" type product, but it is empty.
I can get bought-together items via:
but in foreach for $boutghtItem will empty for select type.
I tried to set up the product domain in any related manager for getting it, but it does not work.
Can you help please, how to do it, or what I do wrong? Thank you!
My version is Laravel 2020.10.
Seems it is no way to get subproducts (or other) referenced items for bought together products on catalog detail? I need to get products on the "select" type product, but it is empty.
I can get bought-together items via:
Code: Select all
$boutghtItems = $detailProductItem->getRefItems('product', null, 'bought-together');
Code: Select all
$boutghtItem->getRefItems('product', 'default', 'default')
Can you help please, how to do it, or what I do wrong? Thank you!
Re: How to get getRefItems('product') of bought together in catalog/detail?
There's a decorator to prevent fetching huge amount of data accidentially or worse, being trapped in a recursion due to two products referencing each other. You can change the maximum depth of retrieving referenced items by configuration:
https://github.com/aimeos/aimeos-core/b ... hp#L40-L56
https://github.com/aimeos/aimeos-core/b ... hp#L40-L56
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
-
- Posts: 27
- Joined: 04 Jun 2020, 14:00
Re: How to get getRefItems('product') of bought together in catalog/detail?
Thank you, I changed config maxdepth from 2 to 3, and all working great now!