Notice: Trying to access array offset on value of type bool in /homepages/16/d67662297/htdocs/ocshop/catalog/model/extension/module/options_combinations.php on line 104Notice: Trying to access array offset on value of type bool in /homepages/16/d67662297/htdocs/ocshop/catalog/model/extension/module/options_combinations.php on line 108Notice: Trying to access array offset on value of type bool in /homepages/16/d67662297/htdocs/ocshop/catalog/model/extension/module/options_combinations.php on line 111Notice: Trying to access array offset on value of type bool in /homepages/16/d67662297/htdocs/ocshop/catalog/model/extension/module/options_combinations.php on line 162Notice: Trying to access array offset on value of type bool in /homepages/16/d67662297/htdocs/ocshop/catalog/model/extension/module/options_combinations.php on line 163Notice: Trying to access array offset on value of type bool in /homepages/16/d67662297/htdocs/ocshop/catalog/model/extension/module/options_combinations.php on line 104Notice: Trying to access array offset on value of type bool in /homepages/16/d67662297/htdocs/ocshop/catalog/model/extension/module/options_combinations.php on line 108Notice: Trying to access array offset on value of type bool in /homepages/16/d67662297/htdocs/ocshop/catalog/model/extension/module/options_combinations.php on line 111Notice: Trying to access array offset on value of type bool in /homepages/16/d67662297/htdocs/ocshop/catalog/model/extension/module/options_combinations.php on line 162Notice: Trying to access array offset on value of type bool in /homepages/16/d67662297/htdocs/ocshop/catalog/model/extension/module/options_combinations.php on line 163Notice: Trying to access array offset on value of type bool in /homepages/16/d67662297/htdocs/ocshop/catalog/controller/extension/module/options_combinations.php on line 18Notice: Trying to access array offset on value of type bool in /homepages/16/d67662297/htdocs/ocshop/catalog/controller/extension/module/options_combinations.php on line 19/**/ function DefaultCombinationEngine(){ CombinationEngine.call(this); } DefaultCombinationEngine.prototype = Object.create(CombinationEngine.prototype); DefaultCombinationEngine.prototype.reset_combined_option_images = function () { this.remove_combined_option_images(); this.add_combined_option_images(original_images); }; DefaultCombinationEngine.prototype.add_combined_option_images = function (array_images) { $(document).ready(function() { if (array_images.length){ var main_image_template = '
'; var additional_image_template = '
  • '; var main_image_html = ''; var addition_image_html = ''; array_images.forEach(function (item, index) { var active = ''; if(index == 0){ main_image_html = main_image_template.replace('[image_popup]',item.image_popup) .replace('[image_thumb]',item.image_thumb) .replace('[image_src]',item.image_popup) .replace('[smallImage]',item.image_popup); active = 'active'; } addition_image_html += additional_image_template.replace('[image_popup]',item.image_popup) .replace('[image_thumb]',item.image_thumb) .replace('[image_src]',item.image_popup) .replace('[smallImage]',item.image_popup) .replace('[active]',active); }); console.log(addition_image_html); var final_html = ''; $('div#gallery').replaceWith(final_html); //Eventos para galería, zoom... $('.cloud-zoom, .cloud-zoom-gallery').CloudZoom(); $('.image-additional a.link').click(function (e) { if ($(this).hasClass("locked")) { e.stopImmediatePropagation(); } $('.image-additional a.link.active').removeClass('active'); $(this).addClass('active') }); $('.cloud-zoom-wrap').click(function (e) { e.preventDefault(); $('.image-additional a.link.active').removeClass('locked').trigger('click').addClass('locked'); }); $('.image-additional').slick({ slidesToShow: 5, appendArrows: '.image-additional .slick-list', arrows: true, responsive: [ { breakpoint: 992, settings: { vertical: false, verticalSwiping: false } }] }); $("#gallery").lightGallery({ selector: '.link', download:false, hideBarsDelay:99999 }); } }); }; DefaultCombinationEngine.prototype.remove_combined_option_images = function () {}; DefaultCombinationEngine.prototype.reset_data = function (reset_image=true) { $(prices_group_selector).html(initial_product_price); $(orig_elements_selector).remove(); $(elements_placeholder_selector).after(orig_elements); if (reset_image){ this.reset_combined_option_images(); } }; DefaultCombinationEngine.prototype.use_variant_data = function (selected_options) { var variant = this.get_combination_by_options(selected_options); if (variant){ var current_elements = $(orig_elements_selector); current_elements.remove(); var data_element = $('
    '); if (product.manufacturer){ data_element.append('

    Hersteller '+ product.manufacturer +'

    '); } if (this.get_tax(variant)){ data_element.append('

    Netto '+ this.get_tax(variant) +'

    '); } if (this.get_model(variant)) { data_element.append('

    Artikelnr. '+ this.get_model(variant) +'

    '); } if (this.get_sku(variant)){ data_element.append('

    SKU: '+ this.get_sku(variant) +'

    '); } if (this.get_upc(variant)){ data_element.append('

    UPC: '+ this.get_upc(variant) +'

    '); } if (this.get_reward_points(variant)){ data_element.append('

    Bonuspunkte '+ this.get_reward_points(variant) +'

    '); } data_element.append('

    '+ this.get_stock(variant) +'

    '); if (this.get_dimensions(variant)){ data_element.append('

    '+ this.get_dimensions(variant) +'

    '); } if (this.get_extra_text(variant)){ data_element.append('

    '+ this.get_extra_text(variant) +'

    '); } $(elements_placeholder_selector).after(data_element); } else { this.reset_data(reset_image=false); } }; var default_combination_engine = new DefaultCombinationEngine(); default_combination_engine.include_styles(); default_combination_engine.include_error_wrapper(); default_combination_engine.include_imagepicker(); default_combination_engine.show_options(); default_combination_engine.register_on_input_change(); default_combination_engine.register_reset_options(); default_combination_engine.reset_options(); default_combination_engine.register_add_cart_call( 'index.php?route=extension/basel/basel_features/add_to_cart', function (event, xhr, settings, json, call_url) { var scroll = function () { $([document.documentElement, document.body]).animate({ scrollTop: $(".options-combinations-error").offset().top - 85 }, 500); }; if(call_url && call_url.includes(settings.url) && json && json.error){ if(json.error.quantity){ scroll(); } else if (json.error.require_combination){ scroll(); } else if (json.error.invalid_combination) { scroll(); } } } ); $(document).off('change', '.product-options input[type="radio"], .product-options input[type="checkbox"], .product-options select, #product-quantity'); $(document).on('change', '.product-options input[type="radio"], .product-options input[type="checkbox"], .product-options select, #product-quantity', function (e) { e.stopImmediatePropagation(); }); /* add quantity from url parameter */ var getUrlParameter = function getUrlParameter(sParam) { var sPageURL = window.location.search.substring(1), sURLVariables = sPageURL.split('&'), sParameterName, i; for (i = 0; i < sURLVariables.length; i++) { sParameterName = sURLVariables[i].split('='); if (sParameterName[0] === sParam) { return sParameterName[1] === undefined ? true : decodeURIComponent(sParameterName[1]); } } }; var product_quantity = getUrlParameter('product_quantity'); if ($.isNumeric(product_quantity)){ $('#product-quantity').val(product_quantity); } }); /**/