Subversion Repositories SmartDukaan

Rev

Rev 16551 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 16551 Rev 16609
Line 193... Line 193...
193
              checkPincode = false;
193
              checkPincode = false;
194
              return false; 
194
              return false; 
195
          }
195
          }
196
        }
196
        }
197
      }
197
      }
-
 
198
      
-
 
199
function goToStore(storeId, available_price, clickUrl){
-
 
200
	var ajaxUrl = base_url+'productinfo/clicks?source_id=' + storeId + '&available_price=' + available_price + '&click_url=' + encodeURIComponent(clickUrl);
-
 
201
	microAjax(ajaxUrl, function(res){
-
 
202
      	if(res!=''){
-
 
203
			data = JSON.parse(res);
-
 
204
			res = data.response;
-
 
205
			if(res.redirectUrl != undefined && res.redirectUrl != ''){
-
 
206
				ga('send', 'event', 'Affiliate Link Clicked', storeId,clickUrl);
-
 
207
			}
-
 
208
		    var redirectUrl = res.redirectUrl;
-
 
209
		    var isIE = ua.indexOf('msie') !== -1;
-
 
210
		    if (isIE){
-
 
211
		      window.location.replace(redirectUrl);
-
 
212
		    }else{
-
 
213
		      window.location.href = redirectUrl;
-
 
214
		    }
-
 
215
		}
-
 
216
		return;
-
 
217
	});	
-
 
218
}
-
 
219
 
198
function addToCart(){
220
function addToCart(){
199
  
221
  
200
  var itemId ;
222
  var itemId ;
201
  var color = document.getElementById('color');
223
  var color = document.getElementById('color');
202
  if(color != null){
224
  if(color != null){
Line 280... Line 302...
280
/*if(typeof _gaq != "undefined" && _gaq != null)  {
302
/*if(typeof _gaq != "undefined" && _gaq != null)  {
281
    _gaq.push(['_trackEvent', 'Widget', 'Accessory Click', title]);
303
    _gaq.push(['_trackEvent', 'Widget', 'Accessory Click', title]);
282
  }*/
304
  }*/
283
	ga('send', 'event', 'Widget', 'Accessory Click',title);
305
	ga('send', 'event', 'Widget', 'Accessory Click',title);
284
}
306
}
-
 
307
function toggleoffers(source_id){
-
 
308
	sourceElement = document.getElementById(source_id);
-
 
309
	toggleSign = sourceElement.getElementsByClassName("mk_sign")[0].innerHTML;
-
 
310
	elements = sourceElement.getElementsByClassName("mk_canhide")
-
 
311
	if(toggleSign=="+"){
-
 
312
		for (i=0; i<elements.length;i++){
-
 
313
			elements[i].style.display="block";
-
 
314
		}
-
 
315
		sourceElement.getElementsByClassName("mk_sign")[0].innerHTML = "-";
-
 
316
	}else {
-
 
317
		for (i=0; i<elements.length;i++){
-
 
318
			elements[i].style.display="none";
-
 
319
		}
-
 
320
		sourceElement.getElementsByClassName("mk_sign")[0].innerHTML = "+";
-
 
321
	}
-
 
322
}
285
323