Can't get product properties

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!
yahyya
Posts: 2
Joined: 29 Sep 2021, 05:36

Can't get product properties

Post by yahyya » 29 Sep 2021, 05:57

php : 8.0,
aimeos/aimeos-laravel: "~2021.07",

Hi
i was using this line of code to retrieve the properties of a product :

Code: Select all

$product = $manager->get($id, ['text', 'price', 'media', 'attribute', 'product', 'catalog','product/property']);
$product->getPropertyItems()
but now getPropertyItems() is returning an empty array , i have data in database :
Image

iam wondering what is the problem ?
appreciate any help

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

Re: Can't get product properties

Post by aimeos » 30 Sep 2021, 07:43

Did you pass "15" as ID to the get() method?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

yahyya
Posts: 2
Joined: 29 Sep 2021, 05:36

Re: Can't get product properties

Post by yahyya » 30 Sep 2021, 13:21

Yes

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

Re: Can't get product properties

Post by aimeos » 01 Oct 2021, 15:06

What's the output of this line?

Code: Select all

print_r( \Aimeos\MShop::create( $context, 'product' )->get( 15, ['product/property'] ) );
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply