WEB dynamic paypal buttons

Discussion in 'OT Technology' started by intrktevo, Nov 18, 2008.

  1. intrktevo

    intrktevo New Member

    Joined:
    Oct 18, 2004
    Messages:
    5,781
    Likes Received:
    0
    Location:
    UCF
    I decided to make my own image selling script because everything out there was overly complicated.

    I want to have paypal buy it now buttons, but want to be able to create them for items dynamically. I don't want to manually make a new button using the paypal button maker for each image. Is there a way to do this, I could of swore I've seen it done but have been searching and can't find anything.
     
  2. intrktevo

    intrktevo New Member

    Joined:
    Oct 18, 2004
    Messages:
    5,781
    Likes Received:
    0
    Location:
    UCF
    alright, i found some stuff..but now am having trouble with multiple pricing for the same item.

    Customers should be able to choose a picture size, and every size has a different price. However, I can't find anything on how to do that dynamically.

    This is what I have so far

    Code:
                <form name=\"_xclick\" action=\"https://www.paypal.com/cgi-bin/webscr\" method=\"post\">
                <table>
                <tr><td><input type=\"hidden\" name=\"on0\" value=\"Size\">Size</td><td><select name=\"os0\">
                    <option value=\"4x6\">4x6 $8.00
                    <option value=\"8x10\">8x10 $12.00
                    <option value=\"Digital\">Digital $5.00
                </select> </td></tr>
                </table>            
                <input type=\"hidden\" name=\"cmd\" value=\"_xclick\">
                <input type=\"hidden\" name=\"business\" value=\"[email protected]\">
                <input type=\"hidden\" name=\"currency_code\" value=\"USD\">
                <input type=\"hidden\" name=\"item_name\" value=\"{$data}\">
                <input type=\"hidden\" name=\"amount\" value=\"12.99\">
                <input type=\"image\" src=\"http://www.paypal.com/en_US/i/btn/btn_buynow_LG.gif\" border=\"0\" name=\"submit\" alt=\"Make payments with PayPal - it's fast, free and secure!\">
                </form>
    
     
  3. fishbulb

    fishbulb Active Member

    Joined:
    Oct 29, 2001
    Messages:
    6,848
    Likes Received:
    4
    Location:
    md
    Looks like you can put all of that info in a URL string that goes in the Select List in the code shown here:
    http://gallery.menalto.com/node/13689

    failing that you could always use JS to change the name/amount fields onChange of the Select list, but that might be a bit overkill if the above works.
     

Share This Page