SitePoint Sponsor |
|
User Tag List
Results 1 to 4 of 4
-
Aug 24, 2007, 07:01 #1
Need Help with keeping track of stock??
Hi I want to implement a stock system in my website to keep track of my on hand inventory. I have an idea and I have a basic knowledge of how to accomplish this using the database. When I enter my products in the DB for the first time I can enter the stock or quanity. What I am not sure of is do I use negative numbers to show a positive stock so that everytime a customer checks out I can increment up to '0' in the db with '0' meaning out of stock?
Please anyone help me I am confused with the proper way of accomplishing my goal. Thank you in advance all.
-
Aug 24, 2007, 07:11 #2
Why don't you use positive numbers and subtract to '0' where '0' means out of stock?
Guido - Community Team Leader
The Votes Are In: The Winners of the 2013 Community Awards are...
Blog - Free Flash Slideshow Widget
-
Aug 24, 2007, 08:07 #3
- Join Date
- Jan 2002
- Location
- Australia
- Posts
- 2,634
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I have no idea why a negative number would mean "available stock".
Make the stock count positive, and reduce it with the quantity of each order. At 0 you're out of stock, and a negative number might indicate back orders.
-
Aug 24, 2007, 08:36 #4
Ok ty That is what I did. I used positive numbers to indicate positive stock. I started to implement the item quanity feature just today and hope to get it all figured out by tonight. I am not 100% sure exactly how hard it will be for me to incoporate this into my website with the way it is structed and built. I hope it is not too much of a hassle. TY all
Last edited by WebFreakz; Aug 24, 2007 at 10:09.
Bookmarks