VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: OriyanJ on January 18, 2016, 12:08:20 PM

Title: Not letting customer order more than 1 product
Post by: OriyanJ on January 18, 2016, 12:08:20 PM
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.
Title: Re: Not letting customer order more than 1 product
Post by: GJC Web Design on January 18, 2016, 15:09:04 PM
JS or PHP in the cart?

if 2 or more products found disable the checkout button and show a message
Title: Re: Not letting customer order more than 1 product
Post by: OriyanJ on January 19, 2016, 07:38:25 AM
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.
Title: Re: Not letting customer order more than 1 product
Post by: GJC Web Design on January 19, 2016, 11:34:26 AM
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