Is there a config option or something that would enable the 1 line item limit in cart. That means once customer adds second line item to cart first one would be removed so that only one would be left. I believe that's how Commerce Lite works. I need similar functionality on Pro licence.


There is no existing config option for this behaviour with Commerce Pro.

You'd need to write a relatively simple custom module to do this.

You'd probably listen to something like this event:


...and remove anything else in the cart before the new item is added.

or, thinking about it, you might want to first make sure the new item has been successfully added, and only then remove the other items from the cart, in which case:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.