Merchant Affiliate Program
http://forums.mygiftlist.com/affiliates/kb/

StoresOnline integration instructions
http://forums.mygiftlist.com/affiliates/kb/viewtopic.php?f=7&t=73
Page 1 of 1

Author:  admin [ Thu Jun 01, 2006 11:07 pm ]
Post subject:  StoresOnline integration instructions

To integrate MyGiftList with a site that uses StoresOnline for e-commerce, cut and paste the "Add to MyGiftList" HTML code below after the Add to Cart 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 -->
<!--  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:storesOnlineMGLpopup(this.form,"Your Affiliate ID","Your Store Name","storesOnline");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 storesOnlineMGLpopup(f, refsource, storename, cartname) {
   var giftPrice = "";
   var giftName = "";
   var giftDescription = "";
   var m;
   var u = "";
   var n;
   
   if (f) {
      for (var i = 0; i < f.elements.length; i++) {
         if (f.elements[i].name.substr(0,11) == "variations_" ) {
            m = f.elements[i].selectedIndex;
            if (m > -1) {
                u = u + f.elements[i].options[m].text + ", ";
            } else {
                u = u + f.elements[i].value + ", ";
         }
         }
         if (f.elements[i].name.substr(0,9) == "quantity_" ) {
            u = u + "Quantity=" + f.elements[i].value + ", ";
      }
      }
   }

   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(document.title) + "&giftRetailer=" + escape(storename) + "&giftCart=" + escape(cartname) + "&giftPrice=" + escape(giftPrice) + "&giftDescription=" + escape(giftDescription);
   var mgl = window.open(u,"MGL","width=700,height=500,top=60,left=100,resizable,scrollbars");
}
</script>

<!-- End MyGiftList Code -->

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/