Warning: unlink(/data01/virt99639/domeenid/www.ikshop.eu/htdocs/system/cache/cache.product.2.0.1.d7b5cb3227c94ac0c2f509a160998b9d.1740259550): No such file or directory in /data01/virt99639/domeenid/www.ikshop.eu/htdocs/system/library/cache.php on line 14Warning: Cannot modify header information - headers already sent by (output started at /data01/virt99639/domeenid/www.ikshop.eu/htdocs/index.php:114) in /data01/virt99639/domeenid/www.ikshop.eu/htdocs/index.php on line 188Warning: Cannot modify header information - headers already sent by (output started at /data01/virt99639/domeenid/www.ikshop.eu/htdocs/index.php:114) in /data01/virt99639/domeenid/www.ikshop.eu/htdocs/system/library/currency.php on line 45Warning: Cannot modify header information - headers already sent by (output started at /data01/virt99639/domeenid/www.ikshop.eu/htdocs/index.php:114) in /data01/virt99639/domeenid/www.ikshop.eu/htdocs/vqmod/vqcache/vq2-catalog_controller_product_ajaxoptions.php on line 248
var price_with_options_ajax_call = function() {
$.ajax({
type: 'POST',
url: 'index.php?route=product/ajaxoptions/index&pid=15441',
data: $('.product-info input[type=\'text\'], .product-info input[type=\'hidden\'], .product-info input[type=\'radio\']:checked, .product-info input[type=\'checkbox\']:checked, .product-info select, .product-info textarea'),
dataType: 'json',
beforeSend: function() {
// you can add smth useful here
},
complete: function() {
// you can add smth useful here
},
success: function(json) {
if (json.success) {
if ($('.product-info .stock').length > 0) {
animation_on_change_price_with_options('.product-info .stock', json.stock);
}
if ($('.product-info .price-tax').length > 0 && json.new_price.tax) {
animation_on_change_price_with_options('.product-info .price-tax', json.new_price.tax);
}
if ($('.product-info .price-old').length > 0 && json.new_price.price) {
animation_on_change_price_with_options('.product-info .price-old', json.new_price.price);
}
if ($('.product-info .price-new').length > 0 && json.new_price.special) {
animation_on_change_price_with_options('.product-info .price-new', json.new_price.special);
}
if ($('.product-info #price_container').length > 0 && json.new_price.price) {
animation_on_change_price_with_options('.product-info #price_container', json.new_price.price);
}
}
},
error: function(error) {
console.log(error);
}
});
}
var animation_on_change_price_with_options = function(selector_class_or_id, new_html_content) {
$(selector_class_or_id).fadeOut(150, function() {
$(this).html(new_html_content).fadeIn(50);
});
}
if ( jQuery.isFunction(jQuery.fn.on) )
{
$('.product-info input[type=\'text\'], .product-info input[type=\'hidden\'], .product-info input[type=\'radio\']:checked, .product-info input[type=\'checkbox\']:checked, .product-info select, .product-info textarea, .product-info input[name=\'quantity\']').live('change', function() {
price_with_options_ajax_call();
});
}
else
{
$('.product-info input[type=\'text\'], .product-info input[type=\'hidden\'], .product-info input[type=\'radio\']:checked, .product-info input[type=\'checkbox\']:checked, .product-info select, .product-info textarea, .product-info input[name=\'quantity\']').live('change', function() {
price_with_options_ajax_call();
});
}