HTML - Add Variables To Paypal Add To Cart Button
Very new to HTML. I have a basic "Add To Cart" button created thru PayPal's website payments standard. I want to add a 20% discount cart wide for "New Customers Only" at checkout. I have checked add variables and added discount_amount_cart=20. Still doesn't work. I have read that PayPal will not allow discounts in their shopping carts because they are not the owner of said discount. True or False?? Is this possible to do thru PayPal w/out using a third party. If not, why do they give us an option to add advanced variables. Hopefully I'm on the right track here. All help is greatly appreciated!!! This is what I have so far. The original button was set up as a "Computer Setup" service costing $60 usd, small button, encrypted, no drop down or text menus.
Original code: <form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_s-xclick"> <input type="hidden" name="hosted_button_id" value="G7LXUWQLSJPBY"> <input type="image" src="https://www.paypalobjects.com/WEBSCR-640-20110401-1/en_US/i/btn/btn_cart_SM.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"> <img alt="" border="0" src="https://www.paypalobjects.com/WEBSCR-640-20110401-1/en_US/i/scr/pixel.gif" width="1" height="1"> </form> What I have created so far. Still doesn't work. <form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_s-xclick"> <input type="hidden" name="hosted_button_id" value="G7LXUWQLSJPBY"> <input type="hidden" name="add" value="1"> <input type="hidden" name="cmd" value="discount_amount_cart"> <input type="hidden" name="item_name" value="New Customer Discount"> <input type="hidden" name="currency_code" value="USD"> <input type="hidden" name="discount_amount_cart" value="20"> <input type="image" src="https://www.paypalobjects.com/WEBSCR-640-20110401-1/en_US/i/btn/btn_cart_SM.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"> <img alt="" border="0" src="https://www.paypalobjects.com/WEBSCR-640-20110401-1/en_US/i/scr/pixel.gif" width="1" height="1"> </form> Similar Tutorialswith a software i created a webshop but the basket system goes to their own paysystem an i want to sent it to paypal. I attached the original html form. I found out that the function post_bsk does the job. function post_bsk(pf){ if(core.active_servers.length==0&&!tf.isSafari){setTimeout('post_bsk(d.forms["'+pf.name+'"])',100);return;} var cgis=core.active_servers; if(!cgis||cgis.length==0)cgis=['www.globecharge.com/webshop/']; pf.basket.value = tf.xml_basket; pf.regions.value= tf.xml_regions; pf.action='https://'+cgis[0]+'shoporder.cgi'; if(tf.isSafari)setTimeout('d.forms["'+pf.name+'"].submit()',500); else pf.submit(); if(window.scrollTo)window.scrollTo(0,0); var gwcontent=gl('Content'),gwlen=gwcontent.childNodes.length; for(var n=0;n<gwlen;++n){ var el=gwcontent.childNodes[n]; if(el.id=='gwframe'||!el.style)continue; el.style.display='none'; } gl('gwframe').style.display='block'; if(tf.isSafari)gl('gwframe').style.opacity=1;// Safari 3.1.2 doesn't show text when opacity is lowered. AIT type of themes will be affected by this. tf.mfh('WebSiteContent'); } Can you help me please? Thank you I am not sure where to post this but here goes. I am trying to find a way to use javascript (I no nothing about this) to pass to our PayPal shopping cart the right shipping and handling charge. I was told that javascript would be able to help? We are selling 3 things that all have a different price and different shipping charge. The shopping cart works if someone purchases just one item but if someone purchases multiple different items we are charging too much shipping and handling. What I would like to do is take the maximum charge of the items chosen and only charge that amount. One problem I may have is different sizes of the same item seem to take on it's own shipping and handling charge for each size. Here is an extract of my PayPal Shopping Cart html.... First Item For Sale: <input type="hidden" name="add" value="1"> <input type="hidden" name="cmd" value="_cart"> <input type="hidden" name="business" value="abc@123.com"> <input type="hidden" name="item_name" value="2008 Calendar"> <input type="hidden" name="amount" value="16.95"> <input type="hidden" name="shipping" value="10.00"> <input type="hidden" name="shipping2" value="2.00"> <input type="hidden" name="tax" value="1.02"><!-- this is 6% tax GST + no PST on $16.95 --> <input type="hidden" name="buyer_credit_promo_code" value=""> <input type="hidden" name="buyer_credit_product_category" value=""> <input type="hidden" name="buyer_credit_shipping_method" value=""> <input type="hidden" name="buyer_credit_user_address_change" value=""> <input type="hidden" name="no_shipping" value="0"> <input type="hidden" name="no_note" value="1"> <input type="hidden" name="currency_code" value="CAD"> <input type="hidden" name="lc" value="CA"> <input type="hidden" name="bn" value="PP-ShopCartBF"> Second Item For Sale: <input type="hidden" name="add" value="1"> <input type="hidden" name="cmd" value="_cart"> <input type="hidden" name="business" value="abc@123.com"> <input type="hidden" name="item_name" value="OPC Magazine - Issue # 2"> <input type="hidden" name="amount" value="9.99"> <input type="hidden" name="shipping" value="2.00"> <input type="hidden" name="shipping2" value="1.00"> <input type="hidden" name="tax" value="0.00"><!-- no taxes on magazines --> <input type="hidden" name="buyer_credit_promo_code" value=""> <input type="hidden" name="buyer_credit_product_category" value=""> <input type="hidden" name="buyer_credit_shipping_method" value=""> <input type="hidden" name="buyer_credit_user_address_change" value=""> <input type="hidden" name="no_shipping" value="0"> <input type="hidden" name="no_note" value="1"> <input type="hidden" name="currency_code" value="CAD"> <input type="hidden" name="lc" value="CA"> <input type="hidden" name="bn" value="PP-ShopCartBF"> Third Item For Sale - Contains 4 different sizes to choose from: <td><input type="hidden" name="on0" value="Size"> <strong>Size</strong></td> <td><select name="os0"> <option value="Medium">(M) Medium <option value="Large">(L) Large <option value="Extra Large">(XL) Extra Large <option value="Extra Extra Large">(XXL) Extra Extra Large</select> </td> </tr> <tr> <td><input type="hidden" name="on1" value="Colour"> <strong>Colour </strong></td> <td><select name="os1"> <option value="Navy Blue">Navy Blue</select> </td> </tr> </table> <p> <input type="image" src="https://www.paypal.com//en_US/i/btn/sc-but-03.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!"> <img alt="" border="0" src="https://www.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="abc@123.com"> <input type="hidden" name="item_name" value="OPC Golf Shirt"> <input type="hidden" name="amount" value="19.99"> <input type="hidden" name="shipping" value="11.00"> <input type="hidden" name="shipping2" value="5.00"> <input type="hidden" name="tax" value="2.80"><!-- this is 6% tax GST + 8% PST on $19.99 --> <input type="hidden" name="buyer_credit_promo_code" value=""> <input type="hidden" name="buyer_credit_product_category" value=""> <input type="hidden" name="buyer_credit_shipping_method" value=""> <input type="hidden" name="buyer_credit_user_address_change" value=""> <input type="hidden" name="no_shipping" value="0"> <input type="hidden" name="return" value="http://www.outdoorphotographycanada.com/storethankyou.html"> <input type="hidden" name="no_note" value="1"> <input type="hidden" name="currency_code" value="CAD"> <input type="hidden" name="lc" value="CA"> <input type="hidden" name="bn" value="PP-ShopCartBF"> Thank you in advance for any assistance you can provide. Dave. I have a paypal shopping cart here. However the first add to shopping cart button under the text Sparky and the Magic Garden, does not work. I've isolated the problem to this: There is no form tag around this button where as in the other buttons the form tag is there. I spotted this by looking at it in firebug. However the strange thing is is that when I look at the code in the view source then the first button is surrounded by a form tag. as in all the other buttons. This site needs to go live this Monday so if anyone could offer some advice I would be extremely grateful. Hey guys.. im building a website. www.lucymason.com.au and on the site i have a button that links to a paypal page that lets the user buy her CD. The page was fine until i embeded the code paypal gave me for linking the button. after i done this my page formatting when crazy! well its fine in firefox but not in safari and explorer. If any one has any ideas, im really desperate! thanks! Hello Everyone - I'm a complete amateur, so please bear with me. I'm just trying to center a paypal button (with drop down menu) on my mom's webpage. Here's the code: <form action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_s-xclick"> <input type="hidden" name="hosted_button_id" value="T3SA8HMSXQEFY"> <table> <tr><td><input type="hidden" name="on0" value="Quantity">Quantity</td></tr><tr><td><select name="os0"> <option value="5 Pack">5 Pack $14.00</option> <option value="10 Pack">10 Pack $25.00</option> <option value="Each">Each $4.00</option> </select> </td></tr> </table> <input type="hidden" name="currency_code" value="USD"> <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_buynow_SM.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"> <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1"> </form> Any suggestions are greatly appreciated. Thanks! www.massageforhealth.us/alert.html i am trying to identify where in the source code to insert our paypal add to cart button i am putting it close to the line with the button graphic but does it go above below after?? Hi, Yesterday, I wasted a couple hours trying to center the Paypal button inside a form inside a table. You can see it near the bottom of this page: http://www.jesussaidfollowme.org/new...t-theology.htm Do you know how to solve my puzzle? Thank you, Greg Hi guys I want to add simple paypal button at my ebooks selling website. Price is fixed 50$ and I don't wish many many fields. Just email address and name are fine. Please give me any code that I can paste and change the following to set to my site payment account id successful_url failed_url notification email amount I want that after successful payment buyer move to download page or for failed payment move to error page. Anybody please help me GCS To start, I should probably mention I have no experience or knowledge with HTML or coding. I am trying to create a paypal donate button for our website. I would like the user to click the button, then be prompted to enter their in-game username, then be directed to the paypal checkout at the price that I set. The username that they enter will be included in the paypal order options. I'm not 100% sure if this is done with html, and if it isn't I would appreciate a link or tutorial on how I can actually do it. Thanks. Hello, I'm having a problem with a form-style shopping cart button where some unwanted space appears to show up in IE, Safari, and Chrome. It doesn't show up in Firefox however. We're using a Paypal shopping cart system and I used the code they gave me. Any help would be appreciated. Thanks! Website address: http://sunglasseslounge.com/ code problem area: <td align="right" background="images/middlebar.gif"> <form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_s-xclick"> <input type="hidden" name="encrypted" value="-----BEGIN PKCS7----- MIIG1QYJKoZIhvcNAQcEoIIGxjCCBsICAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBA gTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2 ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKo ZIhvcNAQEBBQAEgYCprp2mKFp0CqxpxESBrrW9x9tBiiR1CHzG1Iqop1D0vNd2yNIQgXjK7MKpYB5S6KNyHeH1 A4Z7wf177qB4sqJ5i2eyePHEDIy5ZKz1p1v8tRG/4j3jRyz0mUgGytjZknE3HV715Bok86CXOkrv4k4FQKZXv/ UqfDU6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ZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEW DXJlQHBheXBhbC5jb22CAQAwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOBgQCBXzpWmoBa5e9fo6ujio nW1hUhPkOBakTr3YCDjbYfvJEiv/2P+IobhOGJr85+XHhN0v4gUkEDI8r2/rNk1m0GA8HKddvTjyGw/XqXa+LS TlDYkqI8OwR8GEYj4efEtcRpRYBxV8KxAW93YDWzFGvruKnnLbDAF6VR5w/cCMn5hzGCAZowggGWAgEBMIGUMI GOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxFDASBgNVBAoTC1Bh eVBhbCBJbmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJAR YNcmVAcGF5cGFsLmNvbQIBADAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG 9w0BCQUxDxcNMDgxMDE4MTgyMzE1WjAjBgkqhkiG9w0BCQQxFgQU2vTwOAPDkLyr/VRnNINEuy82xW4wDQYJKo ZIhvcNAQEBBQAEgYAjKOuqysYH6bTqbGioCauhLsPoqz5vxYW9Tf4RKCb5tPiye9toc/8BRj38UFj1J2fVyMI9 eKT6HgWTdkX1Rp1FATc4oGv4xCEiQ5DD4yaaMu3QLvKOG3kvdoFEahGmCeYWnB+afdXlZllL0n034nOHJvkr/S ztcERVPE7TG7Iycw==-----END PKCS7-----"> <input type="image" src="images/cart.gif" border="0" width="75" height="30" name="submit" alt=""> </form> </td> I have a solution with ajax where I send POST-information via <a href> like this: Code: <form name="myForm" action="GoHere.php" method="POST"> <input type="hidden" name="myVariable" value="thevalueiwanttosubmit"> <a href="GoHere.php" onclick="myForm.submit(); return false;">Click here</a> </form> There's also a paginate system with page numbers at the bottom. When I press an item I go to another page with more details. When I press the Back-button in Mozilla everything works fine, but in Explorer I start from page number 1 instead of the page I originally came from. How do I get Explorer to remember the page number? Do I have to change the javascript somehow? Hey All! I didnt know which forum to post this into but i thought i would try here first!! Firstly, i am pretty new to website design, secondly i need to work out how twork with paypal on a site i have created! I have a site that sells online raffle tickets for several competiitions and i need these sales to be done online via paypal!! How do i go about doing this?! Does anyone know any good tutorial sites that will help? Any information will be really appreciated! Many thanks Matt Hey all Just wondering if it is all possible to change paypals 'buy now' box code. So that it does something I want before heading off to paypal. Like this Code: <form action="save.php" method="post"> <textarea name="content"></textarea> <br> <input type="submit" value="OK"> </form> just wondering if anyone knows how to make - where to get a paypal widget, this is for a Clan so its a non profit thing, was hoping to have a per month total it costs, then a bar showing how much has been put in and a donate button i found one he http://bfm.enjin.com/ thanks in advance for your help Morning everyone, hope you can help me! I made a website for a band a few months ago, 1st attempt at this sort of site. The problem i am having a few of the customers, have emailed the band saying the paypal buttons are not working on the merchandise page. So i checked this on my home PC that runs Windows XP, the buttons were all working fine. I was on my laptop which runs Vista and got an email saying the buttons wasn't working, so i checked again on the laptop and none of the buttons were working. Can anyone shed any light on this? Thankyou Link to the Website :- www.****neyrejects.net hi guys, i need some help with my paypal form. I've added option fields and checkboxes but i need to add areas to insert measurements. (basically text boxes). I know how to do this with HTML but my question is: if i put these fields in, will paypal process them and then send me a copy of the orderform so i know what measurements to use? can i access the customers completed form once it is sent through paypal? or will i need to use a php code or something? (if i do does anyone know where i can find the code, maybe have you guys help me write it?) any help is MUCH appreciated, and i could use it asap. thanks a bunch. here's the order form: http://www.collegedresses.com/order.html As this is more than likely a v. dumb question... (I've possibly asked dumber before) Apologies but... Does anyone know if you can amend to "add to cart buttons" from paypal? Every time I amend to <form> code my cart goes on the fritz. All I really want to do is change it from the .gif to a hyperlink... thx in advance... |