VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: vargai75 on September 07, 2016, 17:25:54 PM

Title: Only one product and one quantity in cart
Post by: vargai75 on September 07, 2016, 17:25:54 PM
Hello,

I use VM3 and Joomla 3.6.2 .

Can somebody help to configuring this:

I need only one product and one quantity on the cart. Maximum number of product=1, and maximum quantity=1 .

Thank you!
Title: Re: Only one product and one quantity in cart
Post by: GJC Web Design on September 07, 2016, 17:59:30 PM
hide the quantity buttons and input by css

make the shipping only available for quantity 1
Title: Re: Only one product and one quantity in cart
Post by: vargai75 on September 07, 2016, 18:09:18 PM
I start with it, but this is NOT solution for me, because if set shipping=1 , but the cart enable to have 2 products....just says error :"We are sorry, no shipment method matches the characteristics of your order."

Title: Re: Only one product and one quantity in cart
Post by: GJC Web Design on September 07, 2016, 18:21:19 PM
so change the message!

Sorry -- we only allow you for some strange reason to buy one of anything...
Title: Re: Only one product and one quantity in cart
Post by: vargai75 on September 07, 2016, 20:24:29 PM
:) Thank you for your answering! if i dont find any other solution, i will take it...

I was thinking the same thing(overwrite lang file), but I wish it would be better not to be able to put it in the basket

My problem its same like this post, bad this is an old post for VM1(another file structure and location)

https://forum.virtuemart.net/index.php?topic=113803.0
Title: Re: Only one product and one quantity in cart
Post by: vargai75 on September 07, 2016, 20:36:26 PM
i try overwrite the lang file, but the BIG problem , VM is sends the order is so... i dont need it, i need disable send order with 2 product...
Title: Re: Only one product and one quantity in cart
Post by: Jumbo! on September 07, 2016, 22:09:26 PM
Set "Maximum Purchase Quantity" as 1 in each products. That way VirtueMart will not allow the user to increase the quantity above 1.

To allow only 1 product in cart you will have to develop plugin to reject adding of products to the cart if a product already exists or added earlier.