Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2007
    Location
    England
    Posts
    495
    Tokens
    0

    Default Javascript Cart Button

    Hey,

    I am a photographer, I have a website with a gallery. The gallery is ran by Javascript, when you click the thumb nail the script will take the t off the same so say it was 001t.jpg it will make it 001.jpg and put that file in the div tag called image

    However I want to be able to sell them using paypal's shopping cart...
    however I need to put the gallery name and image name in the name on the button but I cant code javascript so can someone code me one that will update this for me and then put the code it makes into a div tag called cart?

    PLEASE HELP!!!

    Here is the paypal code
    Code:
    <form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" 
    method="post"> 
    <!-- Identify your business so that you can collect the payments. --> 
    <input type="hidden" name="business" value="EMAIL"> 
    <!-- Specify an Add to Cart button. --> 
    <input type="hidden" name="cmd" value="_cart"> 
    <input type="hidden" name="add" value="1"> 
    <!-- Specify details about the item that buyers will purchase. --> 
    <input type="hidden" name="item_name" value="Gallery - '.$gal.' / Photo - 002"> 
    <input type="hidden" name="currency_code" value="GBP"> 
    <!-- Provide a dropdown menu option field. --> 
    <input type="hidden" name="on0" value="Color">Color<br /> 
    <select name="os0"> 
    <option value="Select a color scheme"> 
    -- Select a color --</option> 
    <option value="Colour">Colour</option> 
    <option value="B+W">Black and White</option> 
    </select> <br /> 
    <!-- Provide a dropdown menu option field with prices. --> 
    <input type="hidden" name="on1" value="Size">Size <br /> 
    <select name="os1"> 
    <option 
    value="Select a size">-- Select a size --</option> 
    <option value="2x4">2 x 4 - &pound;3.95</option> 
    <option value="3x5">3 x 5 - &pound;4.95</option> 
    <option value="4x6">4 x 6 - &pound;5.95</option> 
    </select> <br /> 
    <!-- Specify the price that PayPal uses for each option. --> 
    <input type="hidden" name="option_index" value="1"> 
    <input type="hidden" name="option_select0" value="2x4"> 
    <input type="hidden" name="option_amount0" value="3.95"> 
    <input type="hidden" name="option_select1" value="3x5"> 
    <input type="hidden" name="option_amount1" value="4.95"> 
    <input type="hidden" name="option_select2" value="4x6"> 
    <input type="hidden" name="option_amount2" value="5.95"> 
    
    <input type="hidden" name="shopping_url" value="http://www.roizer.com">
    <input type="hidden" name="shipping" value="1.00">
    <input type="hidden" name="shipping2" value="0.50">
    <!-- Display the payment button. --> 
    <input type="image" name="submit" border="0" src="https://www.paypal.com/en_US/i/btn/btn_cart_LG.gif" alt="PayPal - The safer, easier way to pay online"> 
    <img alt="" border="0" width="1" height="1" src="https://www.paypal.com/en_US/i/scr/pixel.gif" > 
    </form>
    Dan


  2. #2
    Join Date
    Sep 2009
    Location
    Hull
    Posts
    827
    Tokens
    0

    Latest Awards:

    Default

    set it up via paypal... dont code your own cos its very unsecure ect... just us paypals website to do it..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •