| Line 172... |
Line 172... |
| 172 |
if($(that).parent().data('storename') == "Saholic")
|
172 |
if($(that).parent().data('storename') == "Saholic")
|
| 173 |
{
|
173 |
{
|
| 174 |
var url = minpriceurl;
|
174 |
var url = minpriceurl;
|
| 175 |
var value = url.substring(url.lastIndexOf('-') + 1);
|
175 |
var value = url.substring(url.lastIndexOf('-') + 1);
|
| 176 |
$(that).parent().attr('data-identifier', value);
|
176 |
$(that).parent().attr('data-identifier', value);
|
| - |
|
177 |
$(that).parent().attr('data-proid', response.products[minpriceindex]['_id']);
|
| 177 |
}
|
178 |
}
|
| 178 |
|
179 |
|
| 179 |
$('#name-'+$(that).data('id')).html(response.products[minpriceindex]['source_product_name']);
|
180 |
$('#name-'+$(that).data('id')).html(response.products[minpriceindex]['source_product_name']);
|
| 180 |
if(response.products[minpriceindex]['coupon'] && response.products[minpriceindex]['coupon'].length>0){
|
181 |
if(response.products[minpriceindex]['coupon'] && response.products[minpriceindex]['coupon'].length>0){
|
| 181 |
$('#couponcode-'+$(that).data('id')).show().find('span.red',0).html(getCouponText(response.products[minpriceindex]['coupon']));
|
182 |
$('#couponcode-'+$(that).data('id')).show().find('span.red',0).html(getCouponText(response.products[minpriceindex]['coupon']));
|
| Line 195... |
Line 196... |
| 195 |
$('#beststorelink').data('id',globalminsku).data('source',globalminsource).data('price',globalminprice).data('url',globalminurl).removeClass('hidden');
|
196 |
$('#beststorelink').data('id',globalminsku).data('source',globalminsource).data('price',globalminprice).data('url',globalminurl).removeClass('hidden');
|
| 196 |
|
197 |
|
| 197 |
var url =$('#beststorelink').data('url');
|
198 |
var url =$('#beststorelink').data('url');
|
| 198 |
var value = url.substring(url.lastIndexOf('-') + 1);
|
199 |
var value = url.substring(url.lastIndexOf('-') + 1);
|
| 199 |
$('#beststorelink').attr('data-identifier', value);
|
200 |
$('#beststorelink').attr('data-identifier', value);
|
| - |
|
201 |
$('#beststorelink').attr('data-proid', response.products[minpriceindex]['_id']);
|
| 200 |
$('#bestpricecontainer').removeClass('hidden');
|
202 |
$('#bestpricecontainer').removeClass('hidden');
|
| - |
|
203 |
|
| 201 |
}
|
204 |
}
|
| 202 |
} else{
|
205 |
} else{
|
| 203 |
ga('send', 'event', 'liveprice', 'outofstock', $('#bestpriceproductname').html());
|
206 |
ga('send', 'event', 'liveprice', 'outofstock', $('#bestpriceproductname').html());
|
| 204 |
var properties = {};
|
207 |
var properties = {};
|
| 205 |
properties.sku = String(response.products[0]._id);
|
208 |
properties.sku = String(response.products[0]._id);
|