VirtueMart 3.0.11.4
I want the customer to only be able to order a certain product at a time. They can have quantity, but not 2 or more different products.
Let's say that I want to let them order headphones, but only that, for example. They can order 12 of them, but they can't order a laptop at the same order.
JS or PHP in the cart?
if 2 or more products found disable the checkout button and show a message
I thought about maybe that when customer tried to order another product, the cart's session ends first and then being created again. Or maybe when leaving cart's page, clear it.
seems complicated .. just don't let them checkout if they have more than 1 object in their $cart->products and tell them what is happening