News:

Support the VirtueMart project and become a member

Main Menu

Quantity Controls, increase in multiple of 2

Started by samspain, March 23, 2012, 13:01:48 PM

Previous topic - Next topic

samspain

Hi,  The quantity control buttons showing on the front page of my virtuemart site only increase and decrease in multiples of 2.  I need this to be one.  Does any one else have this problem?

Site is www.margen4.com/m4 , click on tienda online to get to the place.


eldravo


Please check this post:

http://forum.virtuemart.net/index.php?topic=90961.30

I had the same problem and copied the solution from there:


"In order to solve the +2 -2 problem, you must edit the file located under:

/var/www/joomla/components/com_virtuemar/assets/js/vmprices.js

And change the following two lines that you can find at the top of the file:

Change:

                      plus   = cart.find('.quantity-plus'),
                      minus  = cart.find('.quantity-minus'),

with:
                      plus   = cart.find('.quantity-plus').unbind("click"),
                      minus  = cart.find('.quantity-minus').unbind("click"),


Hope this helps you

aarondwyer

I had this fixed in 2.0.18 with the changes from this post.

Now I upgrade to 2.0.20b and the problem is back and I can't fix it with the same fix.

Help. I'll have to ditch the + and - minus buttons until I can fix this.

So every time virtuemart does a core release you have to update this?

I've tried turning off virtuemart jquery but that stops it from working at all. Which is also strange since I've got jquery in the Joomla template.

Aaron

jenkinhill

Quote from: aarondwyer on March 18, 2013, 21:31:16 PM
So every time virtuemart does a core release you have to update this?

Yes, I'm afraid so;  that is why we do not support hacking the core code. Use overrides whenever possible, or if that is not possible write a plugin to alter functions.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

aarondwyer

Couldn't solve this so I've had to remove the + and - buttons with CSS display:none

Which is a real shame since those + and - buttons are very cool.

I know why it's happening (due to jquery being called multiple times on the click) but I have no idea how to fix in VM2.0.20b

jenkinhill

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

aarondwyer

Thank you Jenkin for your great suggestion.

I've tried that plugin this morning and unfortunately that didn't work either.

I get an increment of 3 on my category page (which I've added the addtocart functionality to) and an increment of 2 on my productdetails page.

My prices also disappear when I change the quantity. Even with the plus and minus disabled, so I've got some funky jQuery conflict going on that I just can't fix.

I've turned off the plus and minus ability and just added the word QTY to go next to the quantity input text box so the users know what that box is for.

My client will just have to live with it.