CharlieJW Posted April 8, 2006 Share Posted April 8, 2006 Hi, i am building my own online shop and i have decided that A: i dont want to spend alot of money on some software that will build me one and B: I want to be able to design my site and not be restricted to templates! so i have decided to use paypal! unfortunately i cant work out how to make paypal stop selling an item after it has been sold a number of time so that then i wont be selling things that i dont own! I have tought that i could get my website so that after the "add to cart" button has been pressed a number of times it is replaced by an "out of stock" message but i dont know how to do that either! Please can someone tell me how i could do this or any alternatives?Thanx in advance,Charlie Quote Link to comment Share on other sites More sharing options...
stephenk Posted April 8, 2006 Share Posted April 8, 2006 You could try to integrate mySQL with your shopping system. You enter the number you have in stock in the database. When one is ordered, the value in the database becomes 1 less.To show the icon: Do a query on the database to check how many are in stock. If there is 0, echo "<img src = 'outofstock.jpg'> else echo "<img src = 'instock.jpg'> (where instock and outofstock are the images names)Hope this gets you started.Stephen Quote Link to comment Share on other sites More sharing options...
CharlieJW Posted April 9, 2006 Author Share Posted April 9, 2006 thanx Quote Link to comment Share on other sites More sharing options...
dnirvine Posted April 9, 2006 Share Posted April 9, 2006 I would not use a PayPal Cart for this as if the purchaser adds it to the cart your PHP will decres the product availablity number and add it to the cart. However if the person decides he doesn't want it and removes it from the PayPal Cart your PHP won't reconize that and may look like you don't have something in stock that you actually do own. I suggest maybe trying to code your own cart system. But it is up to you. Quote Link to comment Share on other sites More sharing options...
CharlieJW Posted April 9, 2006 Author Share Posted April 9, 2006 I could download an open source E-commerce website builder and copy the code of the cart and other shop elements into the design of the website i have currently made, would this work? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.