Search By Google
Komentar
    Kalender
    Nopember 2009
    S S R K J S M
    « Feb    
     1
    2345678
    9101112131415
    16171819202122
    23242526272829
    30  
    Ngobrol Yuks
    Category
    Buy Your Wordpress E-commerce Theme. Buy Now



    Proactol







    UniqueHoodia



    PenisHealth



    MoreNiche



    SizeGenetics



    AppStore Charts

    Paypal : How to add multiple items in one button


    Hi, I was wondering if this was possible with PayPal cart or if I need to write up some JavaScript etc.

    So, I know when you use the _cart command and _upload you get item_x and amount_x etc, but when i tried to use it with just _cart and no _upload I get some error stating i need to enter in an amount.

    Does PayPal simply only allow you to add one item per button click? I would just use the 3rd party cart one but I need to be able to update the quantity within the cart.

    Here is what I’m trying to do: I have four products, and in one ordering section for ease of use I decided to have 4 input boxes and then an add to cart button. I then have a PHP script that will process the amount they put in, apply the correct price information, generate a form and submit it to paypal via javascript. I also have other sections on the site that just have one button per entry box and thoose also need to  be updated within the same cart.

    I’m not afraid of doing advanced things in PHP and JavaScript, I am just new to the PayPal cart ( that my client wanted me to use ) and I just don’t know all of its little quriks.

    The only thing I can think of is have four submits of a page, but once you submit the form you go to paypal…

    here is some code:

    <form target="paypal" action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
    
    <input type="image" src="https://www.sandbox.paypal.com/en_US/i/btn/x-click-but22.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
    
    <img alt="" border="0" src="https://www.sandbox.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
    
    <input type="hidden" name="add" value="1">
    
    <input type="hidden" name="cmd" value="_cart">
    
    <input type="hidden" name="business" value="seller_1186539196_biz@stevenheller.net">
    <input type="hidden" name="item_name_1" value="Set of Four"  />
    
    <input type="hidden" name="amount_1" value="24.00"  />
    
    <input type="hidden" name="item_name_2" value="Color Placemat"  />
    
    <input type="hidden" name="amount_2" value="8.00"  />
    
    <input type="hidden" name="quantity_2" value="3"  />
    
    <input type="hidden" name="item_name_3" value="Fundraiser Level II - $10/set"  />
    
    <input type="hidden" name="amount_3" value="10.00"  />
    
    <input type="hidden" name="quantity_3" value="68"  />
    
    <input type="hidden" name="item_name_4" value="Fundraiser Level II - 68 sets @ $10/set"  />
    
    <input type="hidden" name="amount_4" value="680.00"  />
    
    <input type="hidden" name="quantity_4" value="1"  />
    </form>

    Tags: , , ,

    Leave a Reply