| Line 49... |
Line 49... |
| 49 |
$(that).html(minprice);
|
49 |
$(that).html(minprice);
|
| 50 |
$('#sku-'+$(that).data('id')).data('id',response.products[minpriceindex]['_id']).removeClass('hidden');
|
50 |
$('#sku-'+$(that).data('id')).data('id',response.products[minpriceindex]['_id']).removeClass('hidden');
|
| 51 |
console.log(globalminprice+' '+globalminsku);
|
51 |
console.log(globalminprice+' '+globalminsku);
|
| 52 |
if(globalminprice != 9999999) {
|
52 |
if(globalminprice != 9999999) {
|
| 53 |
$('#bestprice').html(globalminprice);
|
53 |
$('#bestprice').html(globalminprice);
|
| - |
|
54 |
$('#beststorelink').data('id',globalminsku).removeClass('hidden');
|
| - |
|
55 |
$('#bestpricecontainer').removeClass('hidden');
|
| 54 |
}
|
56 |
}
|
| 55 |
$('#beststorelink').data('id',globalminsku).removeClass('hidden');
|
- |
|
| 56 |
$('#bestpricecontainer').removeClass('hidden');
|
- |
|
| 57 |
if(!response.products[0].available_price){
|
57 |
if(!response.products[0].available_price){
|
| 58 |
$(that).parent().parent().remove();
|
58 |
$(that).parent().parent().remove();
|
| 59 |
}
|
59 |
}
|
| 60 |
}else{
|
60 |
}else{
|
| 61 |
$(that).parent().parent().remove();
|
61 |
$(that).parent().parent().remove();
|
| Line 70... |
Line 70... |
| 70 |
$(document).on('click','.variants',function(){
|
70 |
$(document).on('click','.variants',function(){
|
| 71 |
$('.storeproductinfo').empty();
|
71 |
$('.storeproductinfo').empty();
|
| 72 |
var variants = $(this).data('variants');
|
72 |
var variants = $(this).data('variants');
|
| 73 |
for(var i in variants){
|
73 |
for(var i in variants){
|
| 74 |
console.log(variants[i]);
|
74 |
console.log(variants[i]);
|
| 75 |
var row = $('<div class="row storeproductinfo"><div class="col-xs-6">'+variants[i].source_product_name+'</div><div class="col-xs-4">'+variants[i].available_price+'</div><div class="col-xs-2"><button class="btn btn-primary btn-xs viewproduct" type="button" data-id="'+variants[i].id+'">Buy</button></div></div>');
|
75 |
var row = $('<div class="row storeproductinfo"><div class="col-xs-8">'+variants[i].source_product_name+'</div><div class="col-xs-3">'+variants[i].available_price+'</div><div class="col-xs-1"><button class="btn btn-primary btn-xs viewproduct" type="button" data-id="'+variants[i].id+'">Buy</button></div></div>');
|
| 76 |
$('#storeproducts').parent().append(row);
|
76 |
$('#storeproducts').parent().append(row);
|
| 77 |
}
|
77 |
}
|
| 78 |
$('#variantModal').modal();
|
78 |
$('#variantModal').modal();
|
| 79 |
});
|
79 |
});
|
| 80 |
$('.categorytab').on('click','.categorytabcontrol.active',function(){
|
80 |
$('.categorytab').on('click','.categorytabcontrol.active',function(){
|
| Line 278... |
Line 278... |
| 278 |
$(this).html('Hide');
|
278 |
$(this).html('Hide');
|
| 279 |
}else{
|
279 |
}else{
|
| 280 |
$(this).html('Others');
|
280 |
$(this).html('Others');
|
| 281 |
}
|
281 |
}
|
| 282 |
});
|
282 |
});
|
| 283 |
});
|
- |
|
| 284 |
|
283 |
});
|
| - |
|
284 |
|