- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have created an ecommerce web page on one of my web sites using PayPal merchant buttons, but I am having some problem on setting up the shipping charges correctly. The page is online here: http://www.urbanlines.asia/prints/gallery.html
At the moment I am using the Shipping Calculation settings that I set up previously for another ecommerce page on another one of my web sites. So as it is now, I have my shipping calculations setup to charge based upon country and quantity of items ordered.
On this new page I just created (above link) there is a 4 item drop down menu for making purchase selections together with an "Add To Cart" button I created. Only 2 of the 4 items I have for sale on the drop down menu can actually be shipped. The other 2 cannot be shipped becuase they are too heavy and delicate, so they must be picked up.
So my problem, or my question I guess, is how can I set it up so that it only automatically charges for shipping on only 2 of the 4 items available for purchase on the drop down menu? For the other 2 items on the 4 item menu, I don't want any shipping charged at all because, again, 2 out of the 4 items for purchase on the menu can't be shipped anyway.
Any advice you casn offer would be much appreciated. I am hoping it is a simple solution.
Cheers...
marc
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Unfortunately there is no simple solution to what you had in mind as it does require some additional programming. One must go outside the box, thus a custom script is required and it cannot use "hosted" item button code. The code has to be clear text meaning not "hosted" and each of the item buttons requires it's own uniquely named script.
Best of luck with your show.
Regards,
skier
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To do what you have in mind would require a custom script to manage the logic needed plus the use of the "shipping" override variables. Check out the tips and examples here for some coding ideas.
Regards,
skier
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Cheers for that. I added in shipping variable code for items 2 and 4 so that those 2 would not be charged shipping at all. Please see below:
<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post"> <div align="center"> <input type="hidden" name="cmd" value="_s-xclick"> <input type="hidden" name="hosted_button_id" value="xxxxxxxxxx"> <table> <tr><td><input type="hidden" name="on0" value="Print Size Options"> <span class="style5">Print Options</span></td> </tr><tr><td><select name="os0"> <option value="20" X 30" – Color - Unframed">20" X 30" – Color - Unframed $290.00</option> <option value="20" X 30" – Color - Framed">20" X 30" – Color - Framed $390.00</option> <option value="20" X 30" – B&W - Unframed">20" X 30" – B&W - Unframed $290.00</option> <option value="20" X 30" – B&W - Framed">20" X 30" – B&W - Framed $390.00</option> </select> </td></tr> </table> <div align="center"></div> <div align="center"> <input type="hidden" name="shipping2" value="0.00"> <input type="hidden" name="shipping4" value="0.00"> <input type="hidden" name="currency_code" value="USD"> <input type="image" src="http://www.photographythailand.com/AddToCart2.gif" border="0" name="submit" alt="Add To Cart" /> <img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1"></div> </form>
I think I put in the right code and in the right place, but it doesn't seem to be working the way I want it to.
I also tried the method given for a "hosted" or "encrypted" item button code by modifying the button code using the "Advanced Variables" in Step 3. There I entered the variables as follows, but it also did not work:
shipping2=0.00
shipping4=0.00
In fact, I saved the above to the button, but it did not change the button code when I did this. Maybe it doesn't change the button code itself when using the advanced variables, but still it didn't work as I said.
On the page link you sent me it also says to go to the Shipping Calculations page and edit the settings so that the "Override Shipping Methods Per Transaction" setting is turned "ON". I can find that setting anywhere though. It is possible the link you sent me is not up to date with all the settings and Paypal has changed some things since?
Anyway, as you can see I tried a bunch of different things. If you can see that I did something wrong which is preventing this from working then please let me know.
Many thanks again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As previously mentioned, you need a "script" to manage the logic. The item button code must be clear text, not "hosted" as you cannot use a script with a "hosted" item button. In addtion, you cannot make up a variable name, i.e., shipping4 is not valid variables and will be ignored. The only valid variables are "shipping" and "shipping2".
Regards,
skier
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Cheers for that again Skier. Please go a bit slow for me here if you don’t mind. I am a bit new to this.
OK, so I will put the item button code as clear text and not as hosted, meaning I won’t edit the button in any way on the PayPal site itself.
A few more points where I am still a bit confused are:
1 – Where can I get the script I need?
2 – Is the script then placed just once within the header of the HTML page like with Java scripts for example?
3 – I am a bit confused on the issue of variable names that you mentioned. My button drop down menu has 4 selections on it. So I would like to make it such that item #2 and item #4 on the drop down menu are not charged for shipping, but item #1 and item #3 still are charged shipping accordingly to my shipping calculations settings. Could you kindly give me an example of what the text variables would be for those 2 instances where I don’t want to charge shipping?
Many thanks again for your help and patience.
Marc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think I might have worked it out. If I understand correctly, I don't actually have to modify the button code. I just need to create a script for the entire page. This is what I did:
<SCRIPT language=javascript> function CalculateOrder(form) { if (form.os0.value == "20" X 30" – Color - Framed") { form.amount.value = 390.00; form.shipping.value ="0.00"; } if (form.os0.value == "20" X 30" – B&W - Framed") { form.amount.value = 390.00; form.shipping.value ="0.00"; } } </SCRIPT>
Will that work?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here's something you can tinker with. Note, each item button will need it's own script. If you plan to have more than one item button on a page, then each script will have to have a unique name, else, you will have unexpected results.
The example is below is a complete web page. Use your email address for the business variable value.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title></title> <meta http-equiv="content-type" content="text/html;charset=utf-8"> <meta name="description" content=""> <meta name="keywords" content=""> <!-- Start of Script --> <SCRIPT language=javascript> <!-- function CalculateOrder(form) { if (form.os0.value == "20x30 - Color - Unframed") { form.amount.value = 290.00; form.item_number.value = "001-20x30-C-UF"; } if (form.os0.value == "20x30 - Color - Framed") { form.amount.value = 390.00; form.item_number.value = "001-20x30-C-F"; form.shipping.value = "0.00"; form.shipping2.value = "0.00"; form.on1.value = "Note"; form.os1.value = "This item must be picked up at Gallery"; } if (form.os0.value == "20x30 - BW - Unframed") { form.amount.value = 290.00; form.item_number.value = "002-20x30-BW-UF"; } if (form.os0.value == "20x30 - BW - Framed") { form.amount.value = 390.00; form.item_number.value = "002-20x30-BW-F"; form.shipping.value = "0.00"; form.shipping2.value = "0.00"; form.on1.value = "Note"; form.os1.value = "This item must be picked up at Gallery"; } } //--> </SCRIPT> <!-- End of Script --> </head> <body> Widget Photo <!-- Start of Form --> <!-- Note: target="paypal" was replaced with the variable target="_self" --> <!-- Note: shopping_url also added to code --> <!-- These two changes allow better functionality with IE and Firefox --> <form target="_self" action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="on0" value="Size/Style">Select your Widget Photo Size: <SELECT name="os0"> <OPTION value="20x30 - Color - Unframed" selected>20x30 - Color - Unframed - $290.00</OPTION> <OPTION value="20x30 - Color - Framed">20x30 - Color - Framed - $390.00</OPTION> <OPTION value="20x30 - BW - Unframed">20x30 - B&W - Unframed - $290.00</OPTION> <OPTION value="20x30 - BW - Framed">20x30 - B&W - Framed - $390.00</OPTION> </SELECT> <br><br> <INPUT onclick=CalculateOrder(this.form) type="image" alt="Make payments with PayPal - it's fast, free and secure!" src="https://www.paypal.com//en_US/i/btn/x-click-but22.gif" border=0 name="submit"> <input type="hidden" name="add" value="1"> <input type="hidden" name="cmd" value="_cart"> <input type="hidden" name="business" value="youremail @ youremail.com"> <input type="hidden" name="item_name" value="Widget Photo"> <input type="hidden" name="amount"> <input type="hidden" name="item_number"> <input type="hidden" name="no_shipping" value="2"> <input type="hidden" name="shipping"> <input type="hidden" name="on1"> <input type="hidden" name="os1"> <input type="hidden" name="shipping2"> <input type="hidden" name="shopping_url" value="http://www.yourwebsite.com/your_page.html"> <input type="hidden" name="return" value="http://www.yourwebsite.com/successorder.html"> <input type="hidden" name="cancel_return" value="http://www.yourwebsite.com/cancel.html"> <input type="hidden" name="currency_code" value="USD"> <input type="hidden" name="lc" value="US"> <input type="hidden" name="country" value="US"> <input type="hidden" name="button_subtype" value="products"> <input type="hidden" name="bn" value="PP-ShopCartBF:x-click-but22.gif:NonHosted"> </FORM> <!-- End of Form --> </body> </html>
Regards,
skier
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Cheers again Skier. Basically each of the 18 photos for sale on my page has a different individual PayPal ID number. The pricing and sales options are the same for all 18 of them, but I had to create an individual button for each one in order to give each picture a unique name and number within the shopping cart so that I would know which picture the buyer has purchased. So it sounds like I will need 18 scripts?
I saw the script you provided and I thank you for that, but I am lost a bit. Basically I would need to create that script for all 18 buttons, correct? I am not that good with coding so I am worried if I have to put that much into the code of my HTMl page that I could mess everything up. Not only that, but I don't quite understand the script either.
Its a shame because I would have liked to get this option going, but I think it is just a bit beyond my own programming capabilites. My photo exhibition opens next Tuesday in Bangkok and I need to get the ecommerce page up and running before then.
I think what might be an easier solution for me at this point is to just remove the framed picture options from the drop down menu option all together. I could then just put a note that for orders of framed prints they need to send an email to arrange with me directly.
I wanted to try and make everything automated because sometimes when people are troubled too much to make an online purchase that you could lose an impulse buyer. Much easier if they can just click to order I think and then be done with it. Too bad, but since I am not good enough at coding to handle the scripting, I think I don't have that much of a choice.
Many thanks again and, unless there is an easy way to do this, meaning one that I would be capable of implementing with my limited experience in Java scripting, then I will probably just cant go any further with it.
Cheers...
Marc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Unfortunately there is no simple solution to what you had in mind as it does require some additional programming. One must go outside the box, thus a custom script is required and it cannot use "hosted" item button code. The code has to be clear text meaning not "hosted" and each of the item buttons requires it's own uniquely named script.
Best of luck with your show.
Regards,
skier
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Cheers again for all your help Skier. I nailed it with making a double drop down menu layout and different button identifiers for each menu. The unframed ones are charged shipping this way and the framed menu options are not. Works good. A bit more work, but an easier solution than doing all the scripting. Many thanks again and wish you were in Bangkok to come to the exhibition opening next week. Anyway, you can see what I did here:
www.urbanlines.asia/prints/gallery.html
Best... Marc...

Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Chumba Casino supported by PayPal's resolution team despite supporting documents limited account now in About Protections
- No help from Resolution Center in About Settings
- Open PayPal dispute in About Protections
- Question if a buyer can write a request on a PayPal payment in About Business
- Account limitations and Alias' in About Payments