News:

Support the VirtueMart project and become a member

Main Menu

VM3 Problem to increment quantity

Started by wdeveloppement, February 13, 2015, 17:06:42 PM

Previous topic - Next topic

wdeveloppement

Hello,

First I'm french, so sorry for my english and if i'll not understand what you'll tell me very well. I'm here cause I don't have any answer on the french forum.

I created some products with custom field. The type of this field is "generic variant child". The original product has the description, the picture, the price but we can't select it. Then I created children with their own name, ref and stock. So I have a probleme to increment the quantity of children products. When I push "+", the quantity increase with 2 items and not one. Its the same with "-". I noticed that when I refresh the page, it works well. I checked the quantity minium to be allowed to buy a product, and i have nothing in this parameter.

I really don't understand the problem. The other products, without link "parent / child", works well.

I wanted to publish my website today, but with this i can't. I try to find an issue since yesterday, someone can help me please ?

Best regards  ;)

Edit : VM 3.0.4 and Joomla 3.3.6

wdeveloppement

I spoke with Studio 42(electrocity) and he found the problem.

It's a mistake in /components/com_virtuemart/assets/js/vmprices.js, he told me to replace those two lines :
plus   = cart.find('.quantity-plus'),
minus  = cart.find('.quantity-minus'),

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

The script was called 2 times. I copy/paste this file in my template and modified those lines.

Now it works. I think it's important to modify the original file for a futur upgraded.

Best regards.