custom/plugins/Theme3S/src/Resources/views/storefront/component/buy-widget/configurator.html.twig line 1
{% block buy_widget_configurator %}
{% if elementId is defined and elementId is not null and pageType != 'product_detail' %}
{% set config = {
url: url('frontend.cms.buybox.switch', { productId: product.parentId }),
elementId: elementId,
pageType: pageType
} %}
{% else %}
{% set config = {
url: url('frontend.detail.switch', { productId: product.parentId }),
pageType: pageType
} %}
{% endif %}
{% block buy_widget_configurator_form %}
{# @deprecated tag:v6.5.0 - Block buy_widget_configurator_csrf will be removed. #}
{% block buy_widget_configurator_csrf %}
{% if elementId is defined and elementId is not null %}
{{ sw_csrf('frontend.cms.buybox.switch') }}
{% else %}
{{ sw_csrf('frontend.detail.switch') }}
{% endif %}
{% endblock %}
{% block buy_widget_configurator_groups %}
{% for group in configuratorSettings %}
{% block buy_widget_configurator_group %}
{% if group.displayType == 'select' %}
{% sw_include '@Storefront/storefront/page/product-detail/configurator/select.html.twig' %}
{% else %}
{% block buy_widget_configurator_group_title %}
{% block buy_widget_configurator_group_title_text %}
{{ group.translated.name }}
{% endblock %}
{% if group.translated.name == 'Größe' %}
i
{% endif %}
{% if group.translated.name == 'Size' %}
i
{% endif %}
{% if group.translated.name == 'Maat' %}
i
{% endif %}
{% if group.translated.name == 'Handschuhgröße' %}
i
{% endif %}
{% if group.translated.name == 'Glovesize' %}
i
{% endif %}
{% if group.translated.name == 'Handschoenen maat' %}
i
{% endif %}
{% endblock %}
{% block buy_widget_configurator_options %}
{% for option in group.options %}
{% if elementId is defined and elementId is not null %}
{% set optionIdentifier = [group.id, option.id, elementId]|join('-') %}
{% else %}
{% set optionIdentifier = [group.id, option.id]|join('-') %}
{% endif %}
{% set isActive = false %}
{% set isCombinableCls = 'is-combinable' %}
{% if option.id in product.optionIds %}
{% set isActive = true %}
{% endif %}
{% if not option.combinable %}
{% set isCombinableCls = false %}
{% endif %}
{% if option.configuratorSetting.media %}
{% set displayType = 'media' %}
{% set media = option.configuratorSetting.media %}
{% else %}
{% set displayType = group.displayType %}
{% if option.media %}
{% set media = option.media %}
{% else %}
{% set media = false %}
{% endif %}
{% endif %}
{% block buy_widget_configurator_option %}
{% endblock %}
{% endfor %}
{% endblock %}
{% endif %}
{% endblock %}
{% endfor %}
{% endblock %}
{% endblock %}
function run(Action) {
// Creating Our XMLHttpRequest object
var xhr = new XMLHttpRequest();
// Making our connection
var url = '{{ absolute_url(asset('bundles/theme3s/functions/getAttributesData.php')) }}&action=' + Action + '&lang={{ page.header.activeLanguage.translationCode.code }}';
xhr.open("GET", url, true);
var Content = "";
// function execute after request is successful
xhr.onreadystatechange = function () {
if (this.readyState == 4 && this.status == 200) {
//Content = this.responseText;
$("#overlaybackground").show();
$("#overlaycontent").show();
$("#overlaycontent").html(this.responseText);
$("body").css("overflow", "hidden");
}
}
// Sending our request
xhr.send();
}
{% endblock %}