| Line 153... |
Line 153... |
| 153 |
updateEstimate(getSeletectedItemId());
|
153 |
updateEstimate(getSeletectedItemId());
|
| 154 |
});
|
154 |
});
|
| 155 |
|
155 |
|
| 156 |
$("#addToCart").click(function(){
|
156 |
$("#addToCart").click(function(){
|
| 157 |
if($(this).attr("href")!=undefined){
|
157 |
if($(this).attr("href")!=undefined){
|
| - |
|
158 |
trackEventWithGA('Affiliate', $(this).attr("affname"), document.title);
|
| 158 |
return true;
|
159 |
return true;
|
| 159 |
}
|
160 |
}
|
| 160 |
jQuery.ajax({
|
161 |
jQuery.ajax({
|
| 161 |
type: "POST",
|
162 |
type: "POST",
|
| 162 |
url: "/addtocart",
|
163 |
url: "/addtocart",
|
| Line 373... |
Line 374... |
| 373 |
function onColorSelectorChange(itemid){
|
374 |
function onColorSelectorChange(itemid){
|
| 374 |
$('div.shipping1').remove();
|
375 |
$('div.shipping1').remove();
|
| 375 |
$('span.mk_emi').show();
|
376 |
$('span.mk_emi').show();
|
| 376 |
$('div.shipping').show();
|
377 |
$('div.shipping').show();
|
| 377 |
$('#addToCart').removeAttr("href");
|
378 |
$('#addToCart').removeAttr("href");
|
| - |
|
379 |
$('#addToCart').removeAttr("affname");
|
| 378 |
if(typeof privateDeals[itemid]== "undefined") {
|
380 |
if(typeof privateDeals[itemid]== "undefined") {
|
| 379 |
sellingPrice = Number(PARAMETERS[itemid].SP);
|
381 |
sellingPrice = Number(PARAMETERS[itemid].SP);
|
| 380 |
if($('#sp').length>0){
|
382 |
if($('#sp').length>0){
|
| 381 |
$('#sp').html(PARAMETERS[itemid].SP);
|
383 |
$('#sp').html(PARAMETERS[itemid].SP);
|
| 382 |
$('#mrp').html(PARAMETERS[itemid].MRP);
|
384 |
$('#mrp').html(PARAMETERS[itemid].MRP);
|
| Line 397... |
Line 399... |
| 397 |
};
|
399 |
};
|
| 398 |
if(typeof exclusiveAffiliateItem != "undefined"){
|
400 |
if(typeof exclusiveAffiliateItem != "undefined"){
|
| 399 |
var innerhtml = '<div class="shipping1 left"><div style="background-color: #FAFAFA;padding:4px;font-size: 14px;">Available on '
|
401 |
var innerhtml = '<div class="shipping1 left"><div style="background-color: #FAFAFA;padding:4px;font-size: 14px;">Available on '
|
| 400 |
+ exclusiveAffiliateItem.affiliateName+'</div><div style="padding: 10px;background-color:#FFF;padding-left: 136px;background-image: url(\'/unversioned/images/' + sellerImg[exclusiveAffiliateItem.affiliateId] + '\');background-repeat: no-repeat;background-size: 120px;color: #777777;font-size: 14px;background-position:left">'
|
402 |
+ exclusiveAffiliateItem.affiliateName+'</div><div style="padding: 10px;background-color:#FFF;padding-left: 136px;background-image: url(\'/unversioned/images/' + sellerImg[exclusiveAffiliateItem.affiliateId] + '\');background-repeat: no-repeat;background-size: 120px;color: #777777;font-size: 14px;background-position:left">'
|
| 401 |
+ (typeof exclusiveAffiliateItem.offerText=="undefined"?'':exclusiveAffiliateItem.offerText) + '</div></div>';
|
403 |
+ (typeof exclusiveAffiliateItem.offerText=="undefined"?'':exclusiveAffiliateItem.offerText) + '</div></div>';
|
| 402 |
$("#addToCart").attr("href", exclusiveAffiliateItem.affiliateUrl);
|
404 |
$("#addToCart").attr("href", exclusiveAffiliateItem.affiliateUrl).attr("affname", exclusiveAffiliateItem.affiliateName);
|
| 403 |
$('div.shipping').hide();
|
405 |
$('div.shipping').hide();
|
| 404 |
$('span.mk_emi').hide();
|
406 |
$('span.mk_emi').hide();
|
| 405 |
$(innerhtml).insertAfter('div.shipping');
|
407 |
$(innerhtml).insertAfter('div.shipping');
|
| 406 |
}
|
408 |
}
|
| 407 |
|
409 |
|