Merchant Affiliate Program

Support Forum
It is currently Thu Nov 23, 2017 6:10 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: ShopSite Integration
PostPosted: Mon Nov 16, 2009 3:24 pm 
Offline
Site Admin

Joined: Mon Mar 29, 2004 3:56 pm
Posts: 114
To integrate MyGiftList with a site that uses ShopSite.com for e-commerce, cut and paste the "Add to MyGiftList" HTML code below after the Add to Cart HTML code in your product detail template


Code:
<input type=image class="add" src="http://yourstore.com/store/media/themesmedia/tab_blue_button_add.gif" name="Add to Cart" alt="Add to Cart">


and before the </form> tag.

Remember to change "Your Affiliate ID" below to your MyGiftList Affiliate ID and "Your Store Name" below to the name of your store.

Please note that this code is not able to transfer the price of the gift to the registry.


Code:
<!-- BEGIN MyGiftList Code -->
<!--  Add this code before the </form> end tag for the Add to Cart button -->
<!--  change "Your Affiliate ID" below to your MyGiftList Affiliate ID -->
<!--  change "Your Store Name" below to the name of your store -->

<BR>
<input type="image" onclick='javascript:shopsiteMGLpopup(this.form,"Your Affiliate ID","Your Store Name","shopsite");return false;' src="http://images.mygiftlist.com/gif/AddtoMyGiftList7e.gif" width=68 height=26 border=0 alt="Click to Add to MyGiftList!">
<script language=javascript>
function shopsiteMGLpopup(f, refsource, storename, cartname) {
   var giftPrice = "";
   var giftName = "";
   var giftQuantity = ""
   var giftDescription = "";
   var m;
   var u = "";
   var n;
   if (f) {
      for (var i = 0; i < f.elements.length; i++) {
      //alert(f.elements[i].name);
         if (f.elements[i].name.indexOf(":finopt:") > -1 ) {
            m = f.elements[i].selectedIndex;
            if (m > -1) {
                u = u + f.elements[i].options[m].text + ", ";
            }
         }
         if (f.elements[i].name.indexOf(":qnty") > -1 ) {
            u = u + "Quantity=" + f.elements[i].value + ", ";
         giftQuantity = f.elements[i].value;
        }
      }
   }

   //alert(u);

   var divs = document.getElementsByTagName("span");
   for (i = 0; i < divs.length; i++) {
     //alert(divs[i].className);
     if (divs[i].className == "ProductName") {
       giftName = divs[i].innerHTML;
       }
     if (divs[i].className == "ProductDescription") {
       giftDescription = divs[i].innerHTML;
       }
     }
 
    if ( u != "" ) {
      u = u.substr(0, u.length-2);
      u = "I would like these options: " + u;
      giftDescription = u + ".  " + giftDescription;
   }

   u = "http://www.mygiftlist.com/register_gift.asp?refSource=" + escape(refsource) + "&giftURL=" + escape(document.URL) + "&giftName=" + escape(giftName) + "&giftRetailer=" + escape(storename) + "&giftCart=" + escape(cartname) + "&giftPrice=" + escape(giftPrice)  + "&giftQuantity=" + escape(giftQuantity) + "&giftDescription=" + escape(giftDescription);
   var mgl = window.open(u,"MGL","width=700,height=500,top=60,left=100,resizable,scrollbars");
   return false;
}
</script>

<!-- End MyGiftList Code -->


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group