custom/plugins/Theme3S/src/Resources/views/storefront/component/buy-widget/configurator.html.twig line 1

  1. {% block buy_widget_configurator %}
  2. {% if elementId is defined and elementId is not null and pageType != 'product_detail' %}
  3. {% set config = {
  4. url: url('frontend.cms.buybox.switch', { productId: product.parentId }),
  5. elementId: elementId,
  6. pageType: pageType
  7. } %}
  8. {% else %}
  9. {% set config = {
  10. url: url('frontend.detail.switch', { productId: product.parentId }),
  11. pageType: pageType
  12. } %}
  13. {% endif %}
  14. {% block buy_widget_configurator_form %}
  15. {# @deprecated tag:v6.5.0 - Block buy_widget_configurator_csrf will be removed. #}
  16. {% block buy_widget_configurator_csrf %}
  17. {% if elementId is defined and elementId is not null %}
  18. {{ sw_csrf('frontend.cms.buybox.switch') }}
  19. {% else %}
  20. {{ sw_csrf('frontend.detail.switch') }}
  21. {% endif %}
  22. {% endblock %}
  23. {% block buy_widget_configurator_groups %}
  24. {% for group in configuratorSettings %}
  25. {% block buy_widget_configurator_group %}
  26. {% if group.displayType == 'select' %}
  27. {% sw_include '@Storefront/storefront/page/product-detail/configurator/select.html.twig' %}
  28. {% else %}
  29. {% block buy_widget_configurator_group_title %}
  30. {% block buy_widget_configurator_group_title_text %}
  31. {{ group.translated.name }}
  32. {% 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 %}
  • {% block buy_widget_configurator_option_radio %}
  • name="{{ group.id }}"
  • value="{{ option.id }}"
  • class="product-detail-configurator-option-input{% if isCombinableCls %} {{ isCombinableCls }}{% endif %}"
  • title="{{ optionIdentifier }}"
  • id="{{ optionIdentifier }}"
  • {% if isActive %}checked="checked"{% endif %}>
  • {% block buy_widget_configurator_option_radio_label %}
  • {% if displayType == 'color' and option.colorHexCode and option.name != 'weiß/blau' %}
  • style="background-color: {{ option.colorHexCode }}"
  • {% elseif option.name == 'weiß/blau' %}
  • style="background: linear-gradient(to bottom left, #ffffff 50%, #395f98 50%);"
  • {% endif %}
  • title="{{ option.translated.name }}"
  • for="{{ optionIdentifier }}">
  • {% if displayType == 'media' and media %}
  • {% block buy_widget_configurator_option_radio_label_media %}
  • {% sw_thumbnails 'configurator-option-img-thumbnails' with {
  • media: media,
  • sizes: {
  • 'default': '52px'
  • },
  • attributes: {
  • 'class': 'product-detail-configurator-option-image',
  • 'alt': option.translated.name,
  • 'title': option.translated.name
  • }
  • } %}
  • {% endblock %}
  • {% elseif displayType == 'text' or
  • (displayType == 'media' and not media) or
  • (displayType == 'color' and not option.colorHexCode) %}
  • {% block buy_widget_configurator_option_radio_label_text %}
  • {{ option.translated.name }}
  • {% endblock %}
  • {% endif %}
  • {% endblock %}
  • {% endblock %}
  • {% endblock %}
  • {% endfor %}
  • {% endblock %}
  • {% endif %}
  • {% endblock %}
  • {% endfor %}
  • {% endblock %}
  • {% endblock %}
  • {% endblock %}