Jump to content

Online shop!


CharlieJW

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.