By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,599 Members | 1,872 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,599 IT Pros & Developers. It's quick & easy.

Shopping Cart

P: 2
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
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..
Aug 30 '06 #1
Share this Question
Share on Google+
1 Reply

P: 2
Nobody has a solution for my problem?

Hmm..maybe a more easy question, someone who knows how to make a stock-feature that automatically updates the amount of products in stock without using php or msql. Javascript for example...

Please help!
Sep 5 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.