Jump to content


Photo

Online shop!


  • Please log in to reply
4 replies to this topic

#1 CharlieJW

CharlieJW
  • New Members
  • Pip
  • Newbie
  • 7 posts

Posted 08 April 2006 - 06:17 PM

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

#2 stephenk

stephenk
  • Members
  • PipPipPip
  • Advanced Member
  • 62 posts

Posted 08 April 2006 - 08:50 PM

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

#3 CharlieJW

CharlieJW
  • New Members
  • Pip
  • Newbie
  • 7 posts

Posted 09 April 2006 - 10:30 AM

thanx

#4 dnirvine

dnirvine
  • New Members
  • Pip
  • Newbie
  • 2 posts
  • LocationSaskatchewan, Canada

Posted 09 April 2006 - 10:36 AM

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.

#5 CharlieJW

CharlieJW
  • New Members
  • Pip
  • Newbie
  • 7 posts

Posted 09 April 2006 - 12:34 PM

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?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users