VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: necati01 on May 10, 2013, 00:48:28 AM

Title: [SOLVED] Undefined quantity virtuemart 2.020b
Post by: necati01 on May 10, 2013, 00:48:28 AM
Hi Guys,

I am creating a webshop which has to go live soon, but i am facing some problem with adding custom fields to products. When selected an attribute, i see "undefined" in the quantity box, in stead of the number "1"

Actually, my problem is exactly the same as on : http://forum.virtuemart.net/index.php?topic=111641.0

There, you can find the details of the problem. But the solution that are given don't work for me. I have replaced the code of the stockable.php file on
Row 399:

Code: [Select]
var quantity = $(".addtocart-bar .quantity-input").val();

with: ( which should be the solution)

Code: [Select]
var quantity = $.parseJSON(\'' .json_encode((int)$this->product->min_order_level). '\') ;
        if (quantity == 0){
            quantity = 1;
         }

I have tried several times, but still it shows undefined and it won't go.

could you please help me with this.

I much appreciate it.

Title: Re: Undefined quantity virtuemart 2.020b
Post by: necati01 on May 11, 2013, 13:57:22 PM
No one who can help me?
Title: Re: Undefined quantity virtuemart 2.020b
Post by: necati01 on May 11, 2013, 14:54:41 PM
The problem is solved. ( the code worked, but the file wasn't uploaded to the server, because of permission rights )