MODIFY PRODUCT BASKET

How to configure and adapt Aimeos based shops as developer
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!
User avatar
marlonsamot
Posts: 9
Joined: 13 Apr 2021, 12:26

MODIFY PRODUCT BASKET

Post by marlonsamot » 13 Apr 2021, 12:35

Hi devs, can i modify or update product in the basket using controller? Please help newbie here. Thanks

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

Re: MODIFY PRODUCT BASKET

Post by aimeos » 15 Apr 2021, 06:44

Yes, use:

Code: Select all

\Aimeos\Controller\Frontend::create( $context, 'basket' )->updateProduct( $position, $quantity );
$position is the key returnd by:

Code: Select all

\Aimeos\Controller\Frontend::create( $context, 'basket' )->get()->getProducts();
Method description:
https://github.com/aimeos/ai-controller ... e.php#L111
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply