I want to include a new validation into the "add to cart" routine: prevent users from adding products of different vendors.
This means that the first time, users are allowed to add to the cart any product but from the second product they must add only products of the same vendor. (otherwise, a system message should warn the user, the same as when an user try to add more products than the maximun amount).
I guess that there is no addon that make this, so:
¿could you guidance on what code should I change?
¿where's located the function that validates the cart?