How To Get Basket Products And Their Details.
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: 86
- Joined: 12 Jan 2019, 15:17
How To Get Basket Products And Their Details.
How To Get All Basket Products In Custom Controller.
Re: How To Get Basket Products And Their Details.
Use something like this:
Code: Select all
$context = app('\Aimeos\Shop\Base\Context')->get();
$controller = \Aimeos\Controller\Frontend\Factory::createController($context, 'basket');
$basket = $controller->get();
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
-
- Expert
- Posts: 274
- Joined: 27 Jun 2019, 16:19
Re: How To Get Basket Products And Their Details.
\Aimeos\Controller\Frontend\Factory this class doesn't exist. How can I do it for 2019 version ?
-
- Expert
- Posts: 274
- Joined: 27 Jun 2019, 16:19
Re: How To Get Basket Products And Their Details.
Code: Select all
$context = app('\Aimeos\Shop\Base\Context')->get();
$controller = \Aimeos\Controller\Frontend\Basket\Factory::create($context);
$basket = $controller->get();
Re: How To Get Basket Products And Their Details.
In 2019.x its:
Code: Select all
$context = app('aimeos.context')->get();
$basket = \Aimeos\Controller\Frontend::create($context, 'basket')->get();
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