| Line 74... |
Line 74... |
| 74 |
};
|
74 |
};
|
| 75 |
function getCouponText(coupon){
|
75 |
function getCouponText(coupon){
|
| 76 |
return "<span class='red'>"+coupon+"</span>";
|
76 |
return "<span class='red'>"+coupon+"</span>";
|
| 77 |
};
|
77 |
};
|
| 78 |
function getGrossPriceText(gross_price,available_price){
|
78 |
function getGrossPriceText(gross_price,available_price){
|
| - |
|
79 |
if(gross_price == available_price)
|
| - |
|
80 |
return "";
|
| 79 |
return "Paytm cashback - "+(gross_price-available_price)+"<br>Net Price = <span class='red'>"+available_price+"</span>"
|
81 |
return "Paytm cashback - "+(gross_price-available_price)+"<br>Net Price = <span class='red text-bigger'>"+available_price+"</span>"
|
| 80 |
}
|
82 |
}
|
| 81 |
function fetchLivePrice(obj){
|
83 |
function fetchLivePrice(obj){
|
| 82 |
ga('send', 'event', 'liveprice', 'fetch',$('#bestpriceproductname').html());
|
84 |
ga('send', 'event', 'liveprice', 'fetch',$('#bestpriceproductname').html());
|
| 83 |
var properties = {};
|
85 |
var properties = {};
|
| 84 |
properties.bundle_id = String($(obj).data('bundle_id'));
|
86 |
properties.bundle_id = String($(obj).data('bundle_id'));
|
| Line 232... |
Line 234... |
| 232 |
var priceToDisplay = variants[i].available_price;
|
234 |
var priceToDisplay = variants[i].available_price;
|
| 233 |
}
|
235 |
}
|
| 234 |
if(minprice == priceToDisplay) {
|
236 |
if(minprice == priceToDisplay) {
|
| 235 |
var html = '<div class="clearfix varnts"></div><div class="col-xs-6 varnts text-small">'+variants[i].name+'</div><div class="col-xs-6 varnts viewproduct" data-source="'+variants[i].source_id+'" data-price="'+priceToDisplay+'" data-url="'+variants[i].url+'" data-id="'+variants[i].id+'"><span class="cashbackrupee varnts text-right" ></span> <span class="storeminprice">'+priceToDisplay+'</span><span class="cashbackamount">'+getcashbackstring(variants[i].cash_back_type,variants[i].cash_back)+'</span><span class="pull-right arrowright"></span>';
|
237 |
var html = '<div class="clearfix varnts"></div><div class="col-xs-6 varnts text-small">'+variants[i].name+'</div><div class="col-xs-6 varnts viewproduct" data-source="'+variants[i].source_id+'" data-price="'+priceToDisplay+'" data-url="'+variants[i].url+'" data-id="'+variants[i].id+'"><span class="cashbackrupee varnts text-right" ></span> <span class="storeminprice">'+priceToDisplay+'</span><span class="cashbackamount">'+getcashbackstring(variants[i].cash_back_type,variants[i].cash_back)+'</span><span class="pull-right arrowright"></span>';
|
| 236 |
} else {
|
238 |
} else {
|
| 237 |
var html = '<div class="clearfix varnts"></div><div class="col-xs-6 varnts text-small">'+variants[i].name+'</div><div class="col-xs-6 varnts viewproduct" data-source="'+variants[i].source_id+'" data-price="'+priceToDisplay+'" data-url="'+variants[i].url+'" data-id="'+variants[i].id+'"><span class="cashbackrupee varnts text-right" ></span> <span>'+priceToDisplay+'</span><span class="cashbackamount">'+getcashbackstring(variants[i].cash_back_type,variants[i].cash_back)+'</span><span class="pull-right arrowright"></span>';
|
239 |
var html = '<div class="clearfix varnts"></div><div class="col-xs-6 varnts text-small">'+variants[i].name+'</div><div class="col-xs-6 varnts viewproduct" data-source="'+variants[i].source_id+'" data-price="'+priceToDisplay+'" data-url="'+variants[i].url+'" data-id="'+variants[i].id+'"><span class="cashbackrupee varnts text-right" ></span> <span class="text-small">'+priceToDisplay+'</span><span class="cashbackamount">'+getcashbackstring(variants[i].cash_back_type,variants[i].cash_back)+'</span><span class="pull-right arrowright"></span>';
|
| 238 |
}
|
240 |
}
|
| 239 |
if(variants[i].gross_price && variants[i].gross_price>0){
|
241 |
if(variants[i].gross_price && variants[i].gross_price>0){
|
| 240 |
html += '<p class="text-small">'+getGrossPriceText(variants[i].gross_price,variants[i].available_price)+'</p>';
|
242 |
html += '<p class="text-small">'+getGrossPriceText(variants[i].gross_price,variants[i].available_price)+'</p>';
|
| 241 |
}
|
243 |
}
|
| 242 |
if(variants[i].offer.length>0){
|
244 |
if(variants[i].offer.length>0){
|
| Line 833... |
Line 835... |
| 833 |
ga('send', 'event', 'popover', me, cookieval);
|
835 |
ga('send', 'event', 'popover', me, cookieval);
|
| 834 |
if (navigator.geolocation) {
|
836 |
if (navigator.geolocation) {
|
| 835 |
navigator.geolocation.getCurrentPosition(showPosition);
|
837 |
navigator.geolocation.getCurrentPosition(showPosition);
|
| 836 |
}
|
838 |
}
|
| 837 |
});
|
839 |
});
|
| - |
|
840 |
$('.getapp').on('click',function(){
|
| - |
|
841 |
var that = $(this);
|
| - |
|
842 |
var req = $.ajax({
|
| - |
|
843 |
url: 'http://104.200.25.40:8057/appAffiliates/generateRedirectUrl/'+me+'/'+$(that).data('id'),
|
| - |
|
844 |
// Tell jQuery we're expecting JSONP
|
| - |
|
845 |
dataType: "jsonp",
|
| - |
|
846 |
// Tell YQL what we want and that we want JSON
|
| - |
|
847 |
method: 'get',
|
| - |
|
848 |
// timeout: 30000,
|
| - |
|
849 |
// Work with the response
|
| - |
|
850 |
success: function( response ) {
|
| - |
|
851 |
console.log(response);
|
| - |
|
852 |
}
|
| - |
|
853 |
});
|
| - |
|
854 |
});
|
| 838 |
function showpopover(id){
|
855 |
function showpopover(id){
|
| 839 |
$('[data-toggle="popover"]#'+id).popover({'html':true});
|
856 |
$('[data-toggle="popover"]#'+id).popover({'html':true});
|
| 840 |
$('[data-toggle="popover"]#'+id).trigger('click');
|
857 |
$('[data-toggle="popover"]#'+id).trigger('click');
|
| 841 |
}
|
858 |
}
|
| 842 |
$(document).on('click','.nodeals',function(){
|
859 |
$(document).on('click','.nodeals',function(){
|