• Gear
  • Shots
  • Photo Craft
  • Video
  • Wide Angle
  • Support
  • New Stuff
  • More
Support SmugMug Customization Shipping Options with Paypal Cart

FAQtoid

Ever wanted to create an Avatar? Creating an Avatar!

Searching Dgrin with Google Searching with Google

Dgrin Challenges

Congratulations to the Winner of DSS #128 (Sunrise or Sunset), ShootingStar.

The next Dgrin Challenge DSS #129 (Silhouette Revisited ) is open for entries through May 27th, 2013 at 8:00pm PDT.

As always, we look forward to your participation but please do take a moment to read through the rules before posting your entry.

Past DSS Challenge Winners, DSS Challenge Rules, and other important DSS Challenge information is here.

Need some help with Accessories?

Tutorials

Ever find yourself wondering just how someone managed to create an image using different effects?

Here are three simple tutorials we hope will encourage you to try something new.

The Hot Seat

A lifelong interest in landscape photography has led Eyal Oren to make a study of his adopted hometown of Marblehead, MA. As you can see, his dedication is paying off!

Africa!

Dgrinners Harryb, Pathfinder, and others joined Andy Williams and Marc Muench on Safari in East Africa recently. Here are some awesome threads to check out!

 
Thread Tools Display Modes
Old Oct-06-2011, 10:00 AM
#1
MomaZunk is offline MomaZunk OP
pro lurker
MomaZunk's Avatar
Shipping Options with Paypal Cart
I am trying to pass the shipping options to the paypal cart, and I can't seem to get the java script correct. I am not a coder, just a cut and paste-r.
Here is my code, perhaps someone here has some insight:
The gallery is here.

Thanks in advance

// ========================================*/
// == Paypal shopping functionality ==*/
// ========================================*/
function setPaypalForm(form) {
urlToImage = webServer + "/gallery/" + AlbumID + "_" + AlbumKey + "/1/" + ImageID + "_" + ImageKey;

i = form.photoselection.selectedIndex;
sPhotoType = form.photoselection.options[i].text;
sPhotoPrice = form.photoselection.options[i].value;

j = form.os1.seletedIndex;
if (j = 1)
form.shipping.value = 0.00;
else
form.shipping.value = 5.00;

urlToImage = sPhotoType + " - Filename: " + photoInfo[ImageID]['fileName'];

form.item_name.value = urlToImage;
form.amount.value = sPhotoPrice;

}



<script type="text/javascript">
function getContinueShoppingURL(form){
// -- Get the href of the currently displayed webpage --
form.shopping_url.value = window.location.href;
}
</script>

<script>
// ========================================*/
// == Paypal shopping functionality ==*/
// ========================================*/
function setPaypalForm(form) {
urlToImage = webServer + "/gallery/" + AlbumID + "_" + AlbumKey + "/1/" + ImageID + "_" + ImageKey;

i = form.photoselection.selectedIndex;
sPhotoType = form.photoselection.options[i].text;
sPhotoPrice = form.photoselection.options[i].value;

j = form.os1.seletedIndex;
if (j = 1)
{
form.shipping.value = 0.00;
}
else
{
form.shipping.value = 5.00;
}

sshipping = form.os1.options[i].value;

urlToImage = sPhotoType + " - Filename: " + photoInfo[ImageID]['fileName'];

form.item_name.value = urlToImage;
form.amount.value = sPhotoPrice;

}
</script>
__________________
Dee Zunker

Website Blog
Facebook Twitter Google+
Tell The World!  
Tags
paypal , shipping cost
Similar Threads Thread Starter Forum Replies Last Post
Suppress PAYPAL ADD to CART 'cept for this page vdotmatrix SmugMug Customization 4 Nov-02-2011 11:32 PM
Paypal Suddenly not adding to cart vdotmatrix SmugMug Customization 3 May-10-2011 08:46 PM
Getting image refs. into Paypal cart RolyG SmugMug Customization 1 Sep-09-2009 01:02 PM
Different PayPal Options for Different Galleries Giles SmugMug Customization 5 Apr-08-2009 02:14 PM
International Shipping - why so expensive? Craig Ridley SmugMug Pro Sales Support 4 Mar-13-2008 11:53 AM


Thread Tools
Display Modes

Posting Rules  
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump