Subversion Repositories SmartDukaan

Rev

Rev 18399 | Rev 18402 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 18399 Rev 18401
Line 192... Line 192...
192
						}
192
						}
193
						$('#sku-'+$(that).data('id')).data('id',response.products[minpriceindex]['_id']).data('source',response.products[minpriceindex]['source_id']).data('price',response.products[minpriceindex]['available_price']).data('url',response.products[minpriceindex]['marketPlaceUrl']).removeClass('hidden');
193
						$('#sku-'+$(that).data('id')).data('id',response.products[minpriceindex]['_id']).data('source',response.products[minpriceindex]['source_id']).data('price',response.products[minpriceindex]['available_price']).data('url',response.products[minpriceindex]['marketPlaceUrl']).removeClass('hidden');
194
						if(globalminprice != 9999999) {
194
						if(globalminprice != 9999999) {
195
							$('#bestprice').html(globalminprice).siblings('.cashbackamount').html(globalmincashback).siblings('.productoffer').html(globalminoffer);
195
							$('#bestprice').html(globalminprice).siblings('.cashbackamount').html(globalmincashback).siblings('.productoffer').html(globalminoffer);
196
							$('#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');
197
 
-
 
198
							var url =$('#beststorelink').data('url');
-
 
199
							var value = url.substring(url.lastIndexOf('-') + 1);
-
 
200
							$('#beststorelink').attr('data-identifier', value);
-
 
201
							$('#beststorelink').attr('data-proid', response.products[minpriceindex]['_id']);
-
 
202
							$('#bestpricecontainer').removeClass('hidden');
197
							$('#bestpricecontainer').removeClass('hidden');
-
 
198
							if(typeof globalsource!= "undefined") {
-
 
199
								if (globalsource==4){
-
 
200
									var value = globalminurl.substring(url.lastIndexOf('-') + 1);
-
 
201
									$('#beststorelink').attr('data-identifier', value);
-
 
202
									$('#beststorelink').attr('data-proid', globalminsku);
-
 
203
								} else {
-
 
204
									$('#beststorelink').removeAttr('data-identifier');
-
 
205
									$('#beststorelink').removeAttr('data-proid');
-
 
206
								}						
203
							
207
							}
204
						} 
208
						} 
205
					} else{
209
					} else{
206
						ga('send', 'event', 'liveprice', 'outofstock', $('#bestpriceproductname').html());
210
						ga('send', 'event', 'liveprice', 'outofstock', $('#bestpriceproductname').html());
207
						var properties = {};
211
						var properties = {};
208
						properties.sku = String(response.products[0]._id);
212
						properties.sku = String(response.products[0]._id);