How To Get Basket Products And Their Details.

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!
awaidqureshi
Posts: 86
Joined: 12 Jan 2019, 15:17

How To Get Basket Products And Their Details.

Post by awaidqureshi » 18 Feb 2019, 14:42

How To Get All Basket Products In Custom Controller.

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

Re: How To Get Basket Products And Their Details.

Post by aimeos » 22 Feb 2019, 08:57

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, Image give us a star

MikaelNazarenko
Expert
Posts: 274
Joined: 27 Jun 2019, 16:19

Re: How To Get Basket Products And Their Details.

Post by MikaelNazarenko » 07 Nov 2019, 13:30

\Aimeos\Controller\Frontend\Factory this class doesn't exist. How can I do it for 2019 version ?

MikaelNazarenko
Expert
Posts: 274
Joined: 27 Jun 2019, 16:19

Re: How To Get Basket Products And Their Details.

Post by MikaelNazarenko » 07 Nov 2019, 13:34

Code: Select all

        $context = app('\Aimeos\Shop\Base\Context')->get();
        $controller = \Aimeos\Controller\Frontend\Basket\Factory::create($context);
        $basket = $controller->get();
Hope it is right solution

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

Re: How To Get Basket Products And Their Details.

Post by aimeos » 07 Nov 2019, 18:55

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, Image give us a star

Post Reply