Warning: "continue 2" targeting switch is equivalent to "break 2". Did you mean to use "continue 3"? in /home/ibikbiz/public_html/OpenCart2/vqmod/vqmod.php on line 684
Warning: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in /home/ibikbiz/public_html/OpenCart2/system/library/session.php on line 24
Warning: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in /home/ibikbiz/public_html/OpenCart2/system/library/session.php on line 25
Warning: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in /home/ibikbiz/public_html/OpenCart2/system/library/session.php on line 26
Warning: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in /home/ibikbiz/public_html/OpenCart2/system/library/session.php on line 27
Warning: session_set_cookie_params(): Cannot change session cookie parameters when headers already sent in /home/ibikbiz/public_html/OpenCart2/system/library/session.php on line 37
Warning: session_start(): Cannot start session when headers already sent in /home/ibikbiz/public_html/OpenCart2/system/library/session.php on line 38
Warning: Cannot modify header information - headers already sent by (output started at /home/ibikbiz/public_html/OpenCart2/vqmod/vqmod.php:684) in /home/ibikbiz/public_html/OpenCart2/catalog/controller/startup/startup.php on line 71
Warning: Cannot modify header information - headers already sent by (output started at /home/ibikbiz/public_html/OpenCart2/vqmod/vqmod.php:684) in /home/ibikbiz/public_html/OpenCart2/catalog/controller/startup/startup.php on line 131
Warning: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in /home/ibikbiz/public_html/OpenCart2/system/library/session.php on line 24Warning: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in /home/ibikbiz/public_html/OpenCart2/system/library/session.php on line 25Warning: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in /home/ibikbiz/public_html/OpenCart2/system/library/session.php on line 26Warning: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in /home/ibikbiz/public_html/OpenCart2/system/library/session.php on line 27Warning: session_set_cookie_params(): Cannot change session cookie parameters when headers already sent in /home/ibikbiz/public_html/OpenCart2/system/library/session.php on line 37Warning: session_start(): Cannot start session when headers already sent in /home/ibikbiz/public_html/OpenCart2/system/library/session.php on line 38Warning: Cannot modify header information - headers already sent by (output started at /home/ibikbiz/public_html/OpenCart2/vqmod/vqmod.php:684) in /home/ibikbiz/public_html/OpenCart2/catalog/controller/product/live_options.php on line 215 var price_with_options_ajax_call = function() {
$.ajax({
type: 'POST',
url: 'index.php?route=product/live_options/index&product_id=16',
data: $('#content input[type=\'text\'], #content input[type=\'hidden\'], #content input[type=\'radio\']:checked, #content input[type=\'checkbox\']:checked, #content select, #content 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 ($('#content .price-tax-live').length > 0 && json.new_price.tax) {
animation_on_change_price_with_options('#content .price-tax-live', json.new_price.tax);
}
if ($('#content .price-new-live').length > 0 && json.new_price.special) {
animation_on_change_price_with_options('#content .price-new-live', json.new_price.special);
}
if ($('#content .price-old-live').length > 0 && json.new_price.price) {
animation_on_change_price_with_options('#content .price-old-live', json.new_price.price);
}
// points
if ($('#content .spend-points-live').length > 0 && json.new_price.points) {
animation_on_change_price_with_options('#content .spend-points-live', json.new_price.points);
}
// reward
if ($('#content .get-reward-live').length > 0 && json.new_price.reward) {
animation_on_change_price_with_options('#content .get-reward-live', json.new_price.reward);
}
}
},
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(150, function() {
$(this).html(new_html_content).fadeIn(50);
});
}
if ( jQuery.isFunction(jQuery.fn.on) )
{
$(document).on('change', '#content input[type=\'text\'], #content input[type=\'hidden\'], #content input[type=\'radio\']:checked, #content input[type=\'checkbox\'], #content select, #content textarea, #content input[name=\'quantity\']', function () {
price_with_options_ajax_call();
});
}
else
{
$('#content input[type=\'text\'], #content input[type=\'hidden\'], #content input[type=\'radio\']:checked, #content input[type=\'checkbox\'], #content select, #content textarea, #content input[name=\'quantity\']').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 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);
});
}