Welcome to the Treehouse Community
Looking to learn something new?
PHP Paypal Automated Pages Issue
Hi there! So right now we are learning how to add paypal buttons on each product page. We only have 1 product page that is linked to an array that has the name/price/image. We use a standard form that has 3 sizes and it appears on every product. Here's my question, if I want to have a text box or another paypal button on one of these product pages, how do i do it? Do I have to restructure the site so that every product has it's own page? Thanks, Eliot
For starters, I highy HIGHLY recommend you go back and repeat the "Integrating with Paypal" stage of Randy's "Build a Simple PHP Application". It literally explains exactly what you want to do.
To put it shortly, your only going to need one page for these products but every time you visit it, it needs to pull the specific information about whichever product the viewer is interested in. This is done by feeding (most likely) an ID number from your array linked to the specific product via a $_GET variable. You will also need the paypal item number in order to add unique products to the paypal shopping cart.
Again, review the paypal stage and if you don't want to go through all of it again, at least download the final code project and fiddle around with that to get an understanding.