Hej I'm going crazy over a problem that maybe easily resolved, but I'm just a beginner in Java so..
I'm using this http://www.nopdesign.com/freecart/index.html
Its a shopping cart system..but its not good enough for what i need..
I need a stock-feature, so that if the stock is empty people can't order anymore..
Im trying to do the following now:
If a person has a value in his "Managecart" under Quantity that is higher then a certain number, it gives a warning and doesnt add the product to the card..
So far i have this (the whole original script is on the link i gave):
var Stockpumpkin = 7;
and later on:
if ( strID_NUM == "FPP1" && fields[1] > Stockpumpkin )
alert( strStock ) ;
But that doesnt work at all...but if I change "fields[1]" to "fields[2]" it does work ..only with the wrong thing (price value) ofcourse..(fields[1] is the quantity wich i need)
Please help i cant figure it out..
Im trying to do that and then make sure that if someone checks out his card the amounts of products are being subtracted from the stockvalues..
I hope thats possible but if someone has a better idea for a adding a stock feature please tell me..
ps.. i cant use MySQL or php or whatever..because my websiteprovider doesnt support all that..