|
|
|
|
@ -66,7 +66,7 @@ $(document).ready(function () { |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
$('.product-min-thumbnails a').each(function(){ |
|
|
|
|
$('.product-min-thumbnails a').each(function(){ |
|
|
|
|
var link = $(this); |
|
|
|
|
link.on('click', function(){ |
|
|
|
|
$('.product-big-thumbnail img').prop('src', link.prop('href')); |
|
|
|
|
@ -75,15 +75,15 @@ $(document).ready(function () { |
|
|
|
|
//$('a#product-big-image-url').prop('href', link.attr('data-big-url'))
|
|
|
|
|
return false; |
|
|
|
|
}) |
|
|
|
|
}); |
|
|
|
|
$('.product-big-thumbnail-container').zoom({url: $('#product-big-image-url').prop("href")}); |
|
|
|
|
}); |
|
|
|
|
$('.product-big-thumbnail-container').zoom({url: $('#product-big-image-url').prop("href")}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function create_cart_add_link(product_pk, count){ |
|
|
|
|
function create_cart_add_link(product_pk, count){ |
|
|
|
|
return $.param.querystring('/store/cart/add/', 'pk=' + product_pk + '&count=' + count + '&next=' + window.location.pathname); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function selectVariation(value, index){ |
|
|
|
|
function selectVariation(value, index){ |
|
|
|
|
var price = $('.product-variations-selecter option[value=' + value + ']').attr('data-price'); |
|
|
|
|
var in_stock = $('.product-variations-selecter option[value=' + value + ']').attr('data-count'); |
|
|
|
|
$('.product-detail-price-span').html(price); |
|
|
|
|
@ -110,35 +110,35 @@ $(document).ready(function () { |
|
|
|
|
$('.product-not-in-stock').show(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$(".product-variations-selecter").selecter({ |
|
|
|
|
$(".product-variations-selecter").selecter({ |
|
|
|
|
callback: selectVariation |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
function selectCount(value, index){ |
|
|
|
|
function selectCount(value, index){ |
|
|
|
|
var price = parseInt($('.product-detail-price-span').html()); |
|
|
|
|
$('.itogo-span').html(price*value); |
|
|
|
|
$('#product-add-to-cart-link').prop('href', |
|
|
|
|
create_cart_add_link($('.product-variations-selecter').val(), |
|
|
|
|
$('.product-count-selecter').val())); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$(".product-count-selecter").selecter({ |
|
|
|
|
$(".product-count-selecter").selecter({ |
|
|
|
|
callback: selectCount |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ($('.product-count-selecter option').size() < 1){ |
|
|
|
|
if ($('.product-count-selecter option').size() < 1){ |
|
|
|
|
$('.product-in-stock').hide(); |
|
|
|
|
$('.product-not-in-stock').show(); |
|
|
|
|
|
|
|
|
|
}else{ |
|
|
|
|
}else{ |
|
|
|
|
$(".product-count-selecter").selecter(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$('ul.messages li').each(function(){ |
|
|
|
|
$('ul.messages li').each(function(){ |
|
|
|
|
var li = $(this); |
|
|
|
|
var messageType = li.attr('data-type'); |
|
|
|
|
swal({ |
|
|
|
|
@ -148,7 +148,7 @@ $(document).ready(function () { |
|
|
|
|
text: li.html() |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|