Unable to call method "createSearch"
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!
- taimoorbbb
- Posts: 1
- Joined: 07 Sep 2021, 00:48
Unable to call method "createSearch"
hi, i am getting this error when i try to get the products
Aimeos\MShop\Exception
Unable to call method "createSearch"
i am using aimeos package in laravel 8.
this is how my code looks
$context = \App::make('\Aimeos\Shop\Base\Context')->get(TRUE);
//Obtain the manager for products
$this->orderManager = \Aimeos\MShop::create($context, 'product');
//Create the search for retrieve the orders
$search = $this->orderManager->createSearch();
$search->setConditions( $search->compare('==', 'product.siteid', $siteID));
$products = $this->orderManager->searchItems($search, ['text', 'price', 'media', 'attribute', 'product'] );
dd($products);
after calling my route instead of getting the list of products, i get unable to call method "createSearch"
Any help on this, really appreciate that. Thanks
Aimeos\MShop\Exception
Unable to call method "createSearch"
i am using aimeos package in laravel 8.
this is how my code looks
$context = \App::make('\Aimeos\Shop\Base\Context')->get(TRUE);
//Obtain the manager for products
$this->orderManager = \Aimeos\MShop::create($context, 'product');
//Create the search for retrieve the orders
$search = $this->orderManager->createSearch();
$search->setConditions( $search->compare('==', 'product.siteid', $siteID));
$products = $this->orderManager->searchItems($search, ['text', 'price', 'media', 'attribute', 'product'] );
dd($products);
after calling my route instead of getting the list of products, i get unable to call method "createSearch"
Any help on this, really appreciate that. Thanks
Re: Unable to call method "createSearch"
You are using code for Aimeos 2019.x and before. Please check the current documentation:
https://aimeos.org/docs/latest/models/managing-items/
https://aimeos.org/docs/latest/models/managing-items/
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