News:

Looking for documentation? Take a look on our wiki

Main Menu

Not letting customer order more than 1 product

Started by OriyanJ, January 18, 2016, 12:08:20 PM

Previous topic - Next topic

OriyanJ

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.
VirtueMart 3.2.2

GJC Web Design

JS or PHP in the cart?

if 2 or more products found disable the checkout button and show a message
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

OriyanJ

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.
VirtueMart 3.2.2

GJC Web Design

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
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation