View Full Version : Adding Paypal Buttons

04-01-2008, 03:41 PM
1) Script Title: Image Thumbnail Viewer II

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/thumbnail2.htm

3) Describe problem:

I have patched together a gallery which can be seen at this link:


It functions exactly as I want it to - but I now want to make Paypal "Add to Cart" buttons appear with each image. Each image has to have an individual button.

Is this at all possible? I'd really like to find out.

Thanks to anyone who might be able to help

Cheers - rigbee

04-02-2008, 05:25 AM
Add it in the JS, something like this should keep you going ;)

imghtml+='<img src="'+theimg[0]+'" border="'+imgborderwidth+' "><img src=\'http://www.knightlite.com/cart.gif\'/>'

See highlighted :)

Hope it helps ;)

04-02-2008, 03:13 PM
Thanks for taking the time to help rangana.

I added the snippet of code and the gallery didn't work anymore.

If it did work, would it not make the same button appear for each image? I was hoping for each image to have its own button.

Any more help greatly appreciated.

04-02-2008, 03:19 PM
Hi Rigbee-
I don't have the exact code but you can go to paypal in the merchant area and have it dynamically generate the code for you, including the button information. You'll end up with form code that you can add into your pages to bring up the buttons. You can create different products in which case you'll get different code for each or you can simply reuse the same code for every picture.

Hope that helps.