SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Zealot WebFreakz's Avatar
    Join Date
    Dec 2006
    Posts
    126
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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.

  2. #2
    From Italy with love silver trophybronze trophy
    guido2004's Avatar
    Join Date
    Sep 2004
    Posts
    9,501
    Mentioned
    163 Post(s)
    Tagged
    4 Thread(s)
    Why don't you use positive numbers and subtract to '0' where '0' means out of stock?

  3. #3
    SitePoint Wizard cranial-bore's Avatar
    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.

  4. #4
    SitePoint Zealot WebFreakz's Avatar
    Join Date
    Dec 2006
    Posts
    126
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by cranial-bore View Post
    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.
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •