Jump to content

Archived

This topic is now archived and is closed to further replies.

CharlieJW

Online shop!

Recommended Posts

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.