Warning: unlink(/var/www/pol88.ru/data/www/pol88.ru/system/storage/cache/cache.product.ocfilter.counter.1.be431565996f96ac1413a7391493b8a5.1741930249): No such file or directory in /var/www/pol88.ru/data/www/pol88.ru/system/library/cache/file.php on line 17

Warning: Cannot modify header information - headers already sent by (output started at /var/www/pol88.ru/data/www/pol88.ru/system/library/cache/file.php:17) in /var/www/pol88.ru/data/www/pol88.ru/system/library/session.php on line 50

Warning: Cannot modify header information - headers already sent by (output started at /var/www/pol88.ru/data/www/pol88.ru/system/library/cache/file.php:17) in /var/www/pol88.ru/data/www/pol88.ru/system/storage/modification/catalog/controller/startup/startup.php on line 97

Warning: Cannot modify header information - headers already sent by (output started at /var/www/pol88.ru/data/www/pol88.ru/system/library/cache/file.php:17) in /var/www/pol88.ru/data/www/pol88.ru/system/storage/modification/catalog/controller/startup/startup.php on line 157
var price_with_options_ajax_call = function() { $.ajax({ type: 'POST', url: 'index.php?route=product/live_options/index&product_id=3107', data: $('#product input[name=\'quantity\'], #product input[name=\'num1\']'), dataType: 'json', beforeSend: function() { // you can add smth useful here }, complete: function() { }, success: function(json) { if (json.success) { if ($('#product .price-tax-live').length > 0 && json.new_price.tax) { animation_on_change_price_with_options('#product .price-tax-live', json.new_price.tax); } if ($('#product #oifsdoi').length > 0 && json.new_price.special) { animation_on_change_price_with_options('#product #oifsdoi', json.new_price.special); } if ($('#product .realy-price').length > 0 && json.new_price.price) { animation_on_change_price_with_options('#product .realy-price', json.new_price.price + 'р.'); var num2 = document.getElementById('num2').value; $(".discount_pack").html(Math.round(num2*json.new_price.price) + 'р.'); var newpackprice = (Math.round(num2*json.new_price.price)); var quant = document.getElementById('input-quantity').value; if (quant > 0) { $(".discount_itog").val(Math.round(quant*newpackprice)); } } // points if ($('#product .spend-points-live').length > 0 && json.new_price.points) { animation_on_change_price_with_options('#product .spend-points-live', json.new_price.points); document.getElementById('calcpak').value = json.new_price.price; } // reward if ($('#product .get-reward-live').length > 0 && json.new_price.reward) { animation_on_change_price_with_options('#product .get-reward-live', json.new_price.reward); document.getElementById('calcpak').value = json.new_price.price; } } }, error: function(error) { console.log('error: '+error); } }); } var animation_on_change_price_with_options = function(selector_class_or_id, new_html_content) { $(selector_class_or_id).fadeOut(0, function() { $(this).html(new_html_content).fadeIn(0); }); } if ($('#product input[name=\'quantity\'], #product input[name=\'num1\']').val() >= 1) { price_with_options_ajax_call(); } if ( jQuery.isFunction(jQuery.fn.on) ) { $(document).on('change', '#product input[name=\'quantity\'], #product input[name=\'num1\']', function () { price_with_options_ajax_call(); }); $(document).on('input', '#product input[name=\'quantity\'], #product input[name=\'num1\']', function () { price_with_options_ajax_call(); }); } else { $('#product input[name=\'quantity\'], #product input[name=\'num1\']').live('change', function() { price_with_options_ajax_call(); }); } // Support spinner_quantity if( $('.number-spinner button').length ){ $(document).on('click', '.number-spinner button', function () { setTimeout(function() { price_with_options_ajax_call(); }, 100); }); } // Support bt_claudine if( $('.btn-plus').length || $('.btn-minus').length ){ $(document).on('click', '.btn-plus', function () { setTimeout(function() { price_with_options_ajax_call(); }, 100); }); $(document).on('click', '.btn-minus', function () { setTimeout(function() { price_with_options_ajax_call(); }, 100); }); } // Support Pav theme if( $('.quantity-adder .add-action').length ){ $(".quantity-adder .add-action").bind( "mouseup touchend", function(e){ setTimeout(function() { price_with_options_ajax_call(); }, 100); }); } // Support vitalia if( $('#q_up').length || $('#q_down').length ){ $('#q_up,#q_down').click(function(){ setTimeout(function() { price_with_options_ajax_call(); }, 100); }); }