News:

Support the VirtueMart project and become a member

Main Menu

[SOLVED] Undefined quantity after 2.0.16 upgrade. A bug?

Started by guidocx842, January 03, 2013, 12:06:05 PM

Previous topic - Next topic

guidocx842

Dear all,
Happy new year to everybody!
Today I find a problem on my Virtuemart 2 installation after I upgrate from 2.0.14 to 2.0.16 version.
I need to give different stock quantity to the different size and colour of my products so I create the fields SIZE and COLOUR in a PLUGIN field.
I use the new feature of the 2.0.16 version so I create, i.e., for my product xxx the childs S Blue, M Blue, L Blue, S Red, M Red, L Red.... etc.. with the quantity setted to 0, 2, 2, 0, 2, 2 (no S).
Now, when I go to the product details page, there is no quantity box (ok) and I see the message that say me that there is no stock quantity available and the user can set the email, etc...
BUT, when from the SELECT I go to change the size, i.e. from S to M, the quantity box appear but it doesn't show the number "1" but the word "undefined" (I copy and past the code that generate the problem.. I get it with firebug). If I press the PLUS button, nothing appens. If I press the minus button, the word "undefined" is changed with the "1"....
I see that in my class there is the js-recalculate so I don't understand why I have this problem!
Can somebody help me please? Thank you very much!

<div class="addtocart-bar">
<!-- <label for="quantity22" class="quantity_box">Quantità: </label> -->
<span class="quantity-box"><input type="text" value="undefined" name="quantity[]" class="quantity-input js-recalculate"></span>
<span class="quantity-controls js-recalculate"><input type="button" class="quantity-controls quantity-plus"><input type="button" class="quantity-controls quantity-minus"></span>
<span class="addtocart-button"><input type="submit" title="ADD TO CART" value="ADD TO CART" class="addtocart-button" name="addtocart"></span>
<div class="clear"></div></div>

Milbo

I am not sure I understand what you do.

Missing quantity box and "I see the message that say me that there is no stock quantity available and the user can set the email, etc..." means that your product has quantity 0. Interesting is this "undefined". It may be connected to your template. Link to your page would help.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

guidocx842

Hi Milbo! And thanks for your answer!
Yes! When the quantity is 0 I give the possibility to click a link a go to a page where the user can insert his email to be adviced when the quantity will be more than 0... but is a function of Virtuemart... nothing that I code manually...
When I turn from a SIZE or a COLOUR that has 0 quantity to a size or a colour that has more than 0, instead to see "1" I see "undefined" in the quantity box...
The site is not yet in production... I've it on a local machine... can I give you some informations that could help? I can copy/paste everything you need to understand... thank you so much!

Milbo

I cannot reproduce it sorry, you may can show me via skype.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

guidocx842

Hi Milbo! Thank you very much for your disponibility.
I'll send you a private message as soon as possible. Thanks!

guidocx842

Hi everybody!
I still not solve that problem... but now you can see the site online!
I'll guide you directly to a page where amazing happens  :(

http://www.andyrichardson.me.uk/shop-on-line/clothing/coats/richmond-park-detail

For size 44 there is a stock quantity set to zero. So the system give you the possibility to insert your email and be advised when this quantity change.

Now please try to move to the size 46.... and you will see that in the quantity box there isn't a numeric value but the word UNDEFINED!

Obviusly, if you try to Add to cart the product, you got an error.

If you try to change with PLUS the value, it doesn't change. It changes only if you press the MINUS.

Please, somebody can help me to solve this problem? I also make the update to the last version of Virtuemart (2.0.18a) but nothing... the problem remain!

Thanks a lot!


guidocx842

You're right!
It works! Thank you very much! I'll continue the discussion in the topic that you suggest me.
Thanks a lot!  ;)

chiappa

no problem :) I hope this gets a fix on the soon to be notorious VM 2.2

*wink* *wink* *nudge* *nudge*


stoeny

Dear all,

I still have the same problem with VM2.0.20, unfortunaly,

if i look in stockable on line 399 there is totaly different code.
The code with quantity is around line 800 and in comment.

Pls help, we want to go live soon.

Thanks in advance!

Pascal

Inter-Web

Hi !

I have the same problem, but; my proyect is:

Joomla! ~~~~>3.4.8
VirtueMart ~~>3.0.12
Versión PHP ~>5.4.44

If anybody help me !





Thank You in advanced !


GJC Web Design

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

Milbo

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/