Merchant Affiliate Program

Support Forum
It is currently Wed Nov 22, 2017 11:35 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Mon Jul 26, 2004 12:35 pm 
Offline
Site Admin

Joined: Mon Mar 29, 2004 3:56 pm
Posts: 114
To integrate MyGiftList with a site that uses aitsafe.com for e-commerce, cut and paste the "Add to MyGiftList" HTML code below after the Add to Cart graphic HTML code but before the </form> tag in your web page.

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


Code:
<!-- BEGIN MyGiftList Code -->
<!--  change "Your Affiliate ID" below to your MyGiftList Affiliate ID -->
<!--  change "Your Store Name" below to the name of your store -->

<input type="image" onclick="javascript:mmMGLpopup(this.form);return false" src="http://www.mygiftlist.com/gif/AddtoMyGiftList7e.gif" width=68 height=26 border=0 alt="Click to Add to MyGiftList!">
<script language=javascript>
function mmMGLpopup(ff) {
   var refsource = "Your Affiliate ID";
   var storename = "Your Store Name";
   var giftPrice = "";
   var giftName = "";
   if (ff) {
      for (var i = 0; i < ff.elements.length; i++) {
         if (ff.elements[i].name == "product[]1") {
            giftName = ff.elements[i].value;
         }
         if (ff.elements[i].name == "product") {
            giftName = ff.elements[i].value;
         }
         if (ff.elements[i].name == "price") {
            giftPrice = ff.elements[i].value;
         }
      }
   }
   var u
   u = "http://www.mygiftlist.com/register_gift.asp?refSource=" + escape(refsource) + "&giftURL=" + escape(document.URL) + "&giftName=" + escape(giftName) + "&giftRetailer=" + escape(storename) + "&giftPrice=" + escape(giftPrice);
   var mgl = window.open(u,"MGL","width=710,height=500,top=60,left=100,resizable,scrollbars");
}
</script>

<!-- End MyGiftList Code -->


Last edited by admin on Mon Apr 07, 2008 11:36 am, edited 3 times in total.

Top
 Profile  
 
PostPosted: Thu Jan 19, 2006 3:20 pm 
Offline
Site Admin

Joined: Mon Mar 29, 2004 3:56 pm
Posts: 114
To integrate MyGiftList with a site that uses aitsafe.com and has products with options that have different pricing, cut and paste the "Add to MyGiftList" HTML code below after the Add to Cart graphic HTML code but before the </form> tag in your web page.

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

Code:
<!-- BEGIN MyGiftList Code -->
<!--  change "Your Affiliate ID" below to your MyGiftList Affiliate ID -->
<!--  change "Your Store Name" below to the name of your store -->
<br>
<br>

<input type="button" value="Add to Gift Registry" onclick="javascript:mmMGLpopup(this.form);return false;">
<script language=javascript>
function mmMGLpopup(ff) {
   var refsource = "Your Affiliate ID";
   var storename = "Your Store Name";
   var giftPrice = "";
   var giftName = "";
   var giftDescription = "";
   var m = "";
   var u = "";
   var temp = "";
   var x;
   var y;

   if (ff) {
       for (var i = 0; i < ff.elements.length; i++) {
           if (ff.elements[i].name == "product[]") {
              if ( giftName != "" ) {
                    giftName = giftName + ", "
              }
               giftName = giftName + ff.elements[i].value;
            }
            if (ff.elements[i].name == "product") {
              if ( giftName != "" ) {
                    giftName = giftName + ", "
               }
               giftName = ff.elements[i].value;
            }
            if (ff.elements[i].name == "productpr") {
               temp = ff.elements[i].value;
            //alert(temp);
            x =  temp.indexOf(":");
               if (x > 0) {
               y = temp.indexOf(":", x+1);
               if (y < x) { y = temp.length; }
               //alert(temp.substring(x+1, y));
                  if (!(isNaN(temp.substring(x+1, y)))) {
                        giftPrice = temp.substring(x+1, y)
                        temp = temp.substring(0, x-1);
                    }
               }   
       
               if ( giftName != "" ) {
                  giftName = giftName + ", "
               }
               giftName = giftName + temp;
            }
            if (ff.elements[i].name == "price") {
                if (giftPrice == "") {
                     giftPrice = ff.elements[i].value;
               }
            }
            if (ff.elements[i].name == "product[]" ) {
               m = ff.elements[i].selectedIndex;
               if (m > -1) {
                   u = u + ff.elements[i].options[m].text + ", ";
               }
            }
         }
    }

    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) + "&giftPrice=" + escape(giftPrice) + "&giftDescription=" + escape(giftDescription);

    var mgl = window.open(u,"MGL","width=710,height=500,top=60,left=100,resizable,scrollbars");

}
</script>

<!-- End MyGiftList Code -->



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

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