Unknown: Creation of dynamic property Request::$request is deprecated in /home/qdomain/public_html/unbannable.com/ocdemo30/system/library/request.php on line 26Unknown: Creation of dynamic property Session\DB::$db is deprecated in /home/qdomain/public_html/unbannable.com/ocdemo30/system/library/session/db.php on line 15Unknown: Creation of dynamic property Openbay::$logger is deprecated in /home/qdomain/public_html/unbannable.com/ocdemo30/system/library/openbay.php on line 22Unknown: Creation of dynamic property Proxy::$getTranslations is deprecated in /home/qdomain/public_html/unbannable.com/ocdemo30/system/engine/proxy.php on line 30Unknown: Creation of dynamic property Proxy::$__construct is deprecated in /home/qdomain/public_html/unbannable.com/ocdemo30/system/engine/proxy.php on line 30Unknown: Creation of dynamic property Proxy::$__get is deprecated in /home/qdomain/public_html/unbannable.com/ocdemo30/system/engine/proxy.php on line 30Unknown: Creation of dynamic property Proxy::$__set is deprecated in /home/qdomain/public_html/unbannable.com/ocdemo30/system/engine/proxy.php on line 30Unknown: mysqli::real_escape_string(): Passing null to parameter #1 ($string) of type string is deprecated in /home/qdomain/public_html/unbannable.com/ocdemo30/system/library/db/mysqli.php on line 45Unknown: Creation of dynamic property Openbay::$logger is deprecated in /home/qdomain/public_html/unbannable.com/ocdemo30/system/library/openbay.php on line 22Unknown: Creation of dynamic property Proxy::$getLanguage is deprecated in /home/qdomain/public_html/unbannable.com/ocdemo30/system/engine/proxy.php on line 30Unknown: Creation of dynamic property Proxy::$getLanguages is deprecated in /home/qdomain/public_html/unbannable.com/ocdemo30/system/engine/proxy.php on line 30Unknown: Creation of dynamic property Proxy::$__construct is deprecated in /home/qdomain/public_html/unbannable.com/ocdemo30/system/engine/proxy.php on line 30Unknown: Creation of dynamic property Proxy::$__get is deprecated in /home/qdomain/public_html/unbannable.com/ocdemo30/system/engine/proxy.php on line 30Unknown: Creation of dynamic property Proxy::$__set is deprecated in /home/qdomain/public_html/unbannable.com/ocdemo30/system/engine/proxy.php on line 30Unknown: Automatic conversion of false to array is deprecated in /home/qdomain/public_html/unbannable.com/ocdemo30/system/modification/catalog/controller/startup/startup.php on line 132Unknown: Creation of dynamic property Cart\Customer::$config is deprecated in /home/qdomain/public_html/unbannable.com/ocdemo30/vqmod/vqcache/vq2-system_library_cart_customer.php on line 14Unknown: Creation of dynamic property Cart\Customer::$db is deprecated in /home/qdomain/public_html/unbannable.com/ocdemo30/vqmod/vqcache/vq2-system_library_cart_customer.php on line 15Unknown: Creation of dynamic property Cart\Customer::$request is deprecated in /home/qdomain/public_html/unbannable.com/ocdemo30/vqmod/vqcache/vq2-system_library_cart_customer.php on line 16Unknown: Creation of dynamic property Cart\Customer::$session is deprecated in /home/qdomain/public_html/unbannable.com/ocdemo30/vqmod/vqcache/vq2-system_library_cart_customer.php on line 17Unknown: Creation of dynamic property Proxy::$getCurrencyByCode is deprecated in /home/qdomain/public_html/unbannable.com/ocdemo30/system/engine/proxy.php on line 30Unknown: Creation of dynamic property Proxy::$getCurrencies is deprecated in /home/qdomain/public_html/unbannable.com/ocdemo30/system/engine/proxy.php on line 30Unknown: Creation of dynamic property Proxy::$__construct is deprecated in /home/qdomain/public_html/unbannable.com/ocdemo30/system/engine/proxy.php on line 30Unknown: Creation of dynamic property Proxy::$__get is deprecated in /home/qdomain/public_html/unbannable.com/ocdemo30/system/engine/proxy.php on line 30Unknown: Creation of dynamic property Proxy::$__set is deprecated in /home/qdomain/public_html/unbannable.com/ocdemo30/system/engine/proxy.php on line 30Warning: Cannot modify header information - headers already sent by (output started at /home/qdomain/public_html/unbannable.com/ocdemo30/system/framework.php:42) in /home/qdomain/public_html/unbannable.com/ocdemo30/system/modification/catalog/controller/startup/startup.php on line 210Unknown: Creation of dynamic property Cart\Currency::$db is deprecated in /home/qdomain/public_html/unbannable.com/ocdemo30/system/library/cart/currency.php on line 7Unknown: Creation of dynamic property Cart\Currency::$language is deprecated in /home/qdomain/public_html/unbannable.com/ocdemo30/system/library/cart/currency.php on line 8Unknown: Creation of dynamic property Cart\Tax::$config is deprecated in /home/qdomain/public_html/unbannable.com/ocdemo30/system/library/cart/tax.php on line 7Unknown: Creation of dynamic property Cart\Tax::$db is deprecated in /home/qdomain/public_html/unbannable.com/ocdemo30/system/library/cart/tax.php on line 8Unknown: Creation of dynamic property Cart\Weight::$db is deprecated in /home/qdomain/public_html/unbannable.com/ocdemo30/system/library/cart/weight.php on line 7Unknown: Creation of dynamic property Cart\Weight::$config is deprecated in /home/qdomain/public_html/unbannable.com/ocdemo30/system/library/cart/weight.php on line 8Unknown: Creation of dynamic property Cart\Length::$db is deprecated in /home/qdomain/public_html/unbannable.com/ocdemo30/system/library/cart/length.php on line 7Unknown: Creation of dynamic property Cart\Length::$config is deprecated in /home/qdomain/public_html/unbannable.com/ocdemo30/system/library/cart/length.php on line 8Unknown: Creation of dynamic property Cart\Cart::$config is deprecated in /home/qdomain/public_html/unbannable.com/ocdemo30/vqmod/vqcache/vq2-system_library_cart_cart.php on line 7Unknown: Creation of dynamic property Cart\Cart::$customer is deprecated in /home/qdomain/public_html/unbannable.com/ocdemo30/vqmod/vqcache/vq2-system_library_cart_cart.php on line 8Unknown: Creation of dynamic property Cart\Cart::$session is deprecated in /home/qdomain/public_html/unbannable.com/ocdemo30/vqmod/vqcache/vq2-system_library_cart_cart.php on line 9Unknown: Creation of dynamic property Cart\Cart::$db is deprecated in /home/qdomain/public_html/unbannable.com/ocdemo30/vqmod/vqcache/vq2-system_library_cart_cart.php on line 10Unknown: Creation of dynamic property Cart\Cart::$tax is deprecated in /home/qdomain/public_html/unbannable.com/ocdemo30/vqmod/vqcache/vq2-system_library_cart_cart.php on line 11Unknown: Creation of dynamic property Cart\Cart::$weight is deprecated in /home/qdomain/public_html/unbannable.com/ocdemo30/vqmod/vqcache/vq2-system_library_cart_cart.php on line 12Unknown: Creation of dynamic property Openbay::$logger is deprecated in /home/qdomain/public_html/unbannable.com/ocdemo30/system/library/openbay.php on line 22 var img = 'img[uo_main_image_id=main_image]'; // The main image uo_main_image_id var origSrc = ''; var origTitle = ''; var origAlt = ''; var origPopup = ''; // Additional option images: //jQuery('img[uo_rel^=addl]').length //var orig_thumb = []; //var orig_popup = []; //jQuery('img[uo_rel^=addl]').each(function(i,j){ // orig_thumb[i] = $(j).attr('src'); // orig_popup[i] = $(j).parent('a').attr('href'); //}); //if (!window.console) {var console = {};} //if (!console.log) {console.log = function() {};} jQuery(document).ready(function(){ console.log('Uber Options - Image: Initialized'); // Store original image source origSrc = jQuery(img).attr('src'); origTitle = jQuery(img).attr('title'); origAlt = jQuery(img).attr('alt'); origPopup = jQuery(img).parent().attr('href'); if (jQuery(img).length == 0) { console.log('img id "'+img+'" not found'); } jQuery(':input[name^="option"], select[name^="option"]').change(function(){ //jQuery(':input[name^="option"][type=\'checkbox\'], :input[type=\'hidden\'], :input[name^="option"][type=\'radio\'], select[name^="option"], :input[name^="quantity"]').change(function(){ obUpdate(jQuery(this)); }); // Force a change on load to support mods like default product options and any "onload" adjustments // use the bRefreshed flag to limit it to a single refresh regardless of how many elements exist var bRefreshed = false; if (jQuery('select[name^="option"] :selected').length && !bRefreshed) { jQuery('select[name^="option"] :selected').change(); bRefreshed = true; } if (jQuery('input[name^="option"][type=radio]:checked').length && !bRefreshed) { jQuery('input[name^="option"][type=radio]:checked').change(); bRefreshed = true; } if (jQuery('input[name^="option"][type=checkbox]:checked').length && !bRefreshed) { jQuery('input[name^="option"][type=checkbox]:checked').change(); bRefreshed = true; } // Support for Options Text Price Per Char Pro. Always refresh for this, regardless of refreshed status if (jQuery('input[type=text][name^=option],textarea[name^=option]').length) { jQuery('input[type=text][name^=option],textarea[name^=option]').change(); } //swatchPanel(jQuery('select[name="option[265]"]')); //swatchPanel(jQuery(':input[name="option[268]"]')); // Enable swatchpanel if any selects or radios have it set jQuery('select[name^="option"]').each(function() { if ($(this).attr('uo_image_swatch') != undefined && $(this).attr('uo_image_swatch') == '1') { swatchPanel($(this)); } }); }); function swatchPanel(el) { // Build swatchpanel with image info. Use native javascript because it is much faster than jQuery var swDiv = document.createElement("div"); // Hide Original Select Box el.hide(); // Select handler if (el.is('select')) { var name = el.attr('name'); xnam = name; xnam2 = xnam.split("["); xnam3 = xnam2[1].split("]"); elname = xnam3[0]; el.find('option').each(function(i,opt) { if ($(opt).attr('uo_thumb') != undefined) { var img = document.createElement('img'); img.src = $(opt).attr('uo_swatch'); img.setAttribute("uo_popup", $(opt).attr('uo_popup')); img.setAttribute("uo_thumb", $(opt).attr('uo_thumb')); img.setAttribute("uo_swatch", $(opt).attr('uo_swatch')); img.style.padding = '2px'; img.setAttribute("idx", $(opt).val()); img.setAttribute("elname", el.attr('name')); img.setAttribute("id", elname); //img.onclick = function() { }; swDiv.appendChild(img); } }); } // Add the new div after the original form control el.before($(swDiv)); } $(document).on('click', 'img[idx]', function() { $('select[name="'+this.getAttribute('elname')+'"]').val(this.getAttribute('idx')); $('select[name="'+this.getAttribute('elname')+'"] option[value='+this.getAttribute('idx')+']').prop('selected', true); $('select[name="'+this.getAttribute('elname')+'"]').change(); this.style.border = 'dashed 1px gray'; $(this).siblings('img').css('border', '0px'); }); function getCookie(name) { name += '='; var parts = document.cookie.split(/;\s*/); for (var i = 0; i < parts.length; i++) { var part = parts[i]; if (part.indexOf(name) == 0) { return part.substring(name.length) } } return null; } function obUpdate(el) { console.log('Uber Options - Image: ImgUpdate Called by ' + jQuery(el).attr('name')); // Set variables... var option_id = el.attr('id'); var option_name = el.attr('name'); var option_val = el.val(); // Remove existing option info jQuery('#option_info').remove(); jQuery('.uo_ajax_error').remove(); if (getCookie('isMijoshop') == '1') { var ajaxurl = 'index.php?option=com_mijoshop&format=raw&tmpl=component&route=product/product/uo_mainimageswap'; } else { var ajaxurl = 'index.php?route=product/product/uo_mainimageswap'; } // ajax lookup jQuery.ajax({ type: 'post', url: ajaxurl, dataType: 'json', data: jQuery(':input[name^="option"][type=\'checkbox\']:checked, :input[type=\'hidden\'], :input[name=\'quantity\'], :input[name^="option"][type=\'radio\']:checked, select[name^="option"]').serialize() + '&option_value_id='+option_val, //data: jQuery(':input[name^="option"][type=\'checkbox\']:checked').serialize() +'&'+ jQuery(':input[type=\'hidden\']').serialize() +'&'+ jQuery(':input[name=\'quantity\']').serialize() +'&'+ jQuery(':input[name^="option"][type=\'radio\']:checked').serialize() +'&'+ jQuery('select[name^="option"]').serialize() +'&'+ jQuery('input[name^="option"][type=\'text\']').serialize() + '&option_value_id='+option_val + '&ppc_current_price='+ppc_current_price, beforeSend: function() { if (getCookie('isMijoshop') == '1') { el.after(''); } else { el.after(''); } }, success: function (data) { jQuery.each(data, function(key, val) { console.log(key+':'+val); }); // Update the main image with the new image. var swatch = data.uo_swatch; var thumb = data.uo_thumb; var popup = data.uo_popup; var name = data.name; var swap = data.uo_image_swap_product; // Swap Image if exists... if (thumb && swap) { jQuery(img).attr('src', thumb); jQuery(img).attr('title', name); jQuery(img).attr('alt', name); jQuery(img).parent().attr('href', popup); jQuery('.zm-viewer img').attr('src', popup); // cloudzoom journal //var czattr = jQuery('img.cloudzoom').attr('data-cloudzoom').replace(/\'(.*?)\'/, '\''+popup+'\''); //jQuery('img.cloudzoom').attr('data-cloudzoom', czattr); //jQuery('.cloudzoom-zoom-inside > img').attr('src', popup); } else if (parseInt(swap)) { //revert back to main if image not exists jQuery(img).attr('src', origSrc); jQuery(img).attr('title', origTitle); jQuery(img).attr('title', origAlt); jQuery(img).parent().attr('href', origPopup); jQuery('.zm-viewer img').attr('src', origPopup); // cloudzoom journal //var czattr = jQuery('img.cloudzoom').attr('data-cloudzoom').replace(/\'(.*?)\'/, '\''+origPopup+'\''); //jQuery('img.cloudzoom').attr('data-cloudzoom', czattr); //jQuery('.cloudzoom-zoom-inside > img').attr('src', origPopup); } //$('#uo_info_div').remove(); //if (data.uo_info) { // jQuery(img).after('
'+data.uo_info+'
'); //} }, error: function(xhr, ajaxOptions, thrownError) { console.log('Uber Options - Main Image Swap: Ajax Lookup Error. Please try again.'); }, complete: function() { jQuery('.uo_loading').remove(); } }); // Get Type for determining checked/unchecked for checkbox var bChecked = true; if (el.is('input:checkbox') && !el.is(':checked')) { bChecked = false; } if (!option_val || bChecked == false) { jQuery(img).attr('src', origSrc); jQuery(img).attr('title', origTitle); jQuery(img).attr('title', origAlt); jQuery(img).parent().attr('href', origPopup); } }