AbanteCart Community

eCommerce construction => Installation and Configuration => Topic started by: trundle on November 12, 2020, 07:27:53 AM

Title: Limit items in cart
Post by: trundle on November 12, 2020, 07:27:53 AM
Is there any way to limit the amount of items a user can have in their cart? I know I can put quantity limits per item, but thats not what I need. We have an application where we want to only allow users to have three items in their cart for any single order. Can this be set somewhere?

TIA
Title: Re: Limit items in cart
Post by: maxter on November 12, 2020, 11:15:23 PM
There is no such setting to limit number or items in the cart, but should be relatively simple to alter in the code

There is "$this->cust_data" array in core/lib/cart.php class. This needs to be limited your requirement.


Title: Re: Limit items in cart
Post by: trundle on November 13, 2020, 02:21:07 PM
Thank you for the reply, but I am not versed in php programming.
If you know what the code should read, I can modify the file.

Thanks again!
Title: Re: Limit items in cart
Post by: abantecart on November 14, 2020, 03:48:31 PM
There are few things that needs to be changed. It would not be as simple as adding a line of code.

This might be a good feature to have for other users, if you are willing to contribute, we can have it done for you and other future versions.
PM if interested in more details.