Class 'Aimeos\MShop\Factory' not found
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
-
- Posts: 10
- Joined: 10 May 2021, 05:35
Class 'Aimeos\MShop\Factory' not found
$total=100;
$context = app()->make('\Aimeos\Shop\Base\Context')->get();
$manager = \Aimeos\MShop\Factory::createManager($context, 'product');
$search = $manager->createSearch(true);
$items = $manager->searchItems($search, ['text', 'price', 'media', 'attribute', 'product'],$total);
I want to get the first 100 products but an error is displayed
Class 'Aimeos\MShop\Factory' not found
Please how can I solve this problem?
$context = app()->make('\Aimeos\Shop\Base\Context')->get();
$manager = \Aimeos\MShop\Factory::createManager($context, 'product');
$search = $manager->createSearch(true);
$items = $manager->searchItems($search, ['text', 'price', 'media', 'attribute', 'product'],$total);
I want to get the first 100 products but an error is displayed
Class 'Aimeos\MShop\Factory' not found
Please how can I solve this problem?
Last edited by JackDarkWeb on 22 Jun 2021, 10:10, edited 1 time in total.
Re: Class 'Aimeos\MShop\Factory' not found
The \Aimeos\MShop\Factory class doesn't exist for years any more. Where did you find that code?
Instead, use
Instead, use
Code: Select all
\Aimeos\MShop::create( $context, 'product' )
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: 10
- Joined: 10 May 2021, 05:35
Re: Class 'Aimeos\MShop\Factory' not found
Then I can write this
$context = app()->make('\Aimeos\Shop\Base\Context')->get();
$manager = \Aimeos\MShop::create($context, 'product');
What method can I use on the $manager object to retrieve all created products?
My objective is to recover all the products created
$context = app()->make('\Aimeos\Shop\Base\Context')->get();
$manager = \Aimeos\MShop::create($context, 'product');
What method can I use on the $manager object to retrieve all created products?
My objective is to recover all the products created