Display every product in basket separately

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!
Pejka
Posts: 17
Joined: 24 Oct 2016, 11:04

Display every product in basket separately

Post by Pejka » 12 Dec 2016, 13:05

Hello!
Is there any setting so that whenever someone adds a product to the basket that's already in the basket, or increases the amount of it, it doesn't increase the quantity but adds a different entry to the basket? In other words, I need a basket that doesn't aggregate the same products into a single line / value, but stores every item separately.
Thanks,
Máté

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

Re: Display every product in basket separately

Post by aimeos » 13 Dec 2016, 10:06

Currently, the same products with the same attributes are merged together due to
https://github.com/aimeos/aimeos-core/b ... e.php#L170

It would be possible to add a parameter like "$merge" (true/false) and pass a new option to addProduct() in the Basket controller:
https://github.com/aimeos/ai-controller ... rd.php#L98

If the basket should contain only products with a quantity of one (several times), you have to overwrite the editProduct() method:
https://github.com/aimeos/ai-controller ... d.php#L172
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply