custom/plugins/theme/src/Resources/views/storefront/page/product-detail/configurator.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/page/product-detail/configurator.html.twig' %}
  2. {% block page_product_detail_configurator_option_radio_label %}
  3.     {# Add available-option class for different available/selectable states #}
  4.     {% set availableClass = 'available-option--unavailable' %}
  5.     {% if isActive %}
  6.         {# Currently selected variation #}
  7.         {% set availableClass = 'available-option--selected' %}
  8.     {% elseif isCombinableCls %}
  9.         {# The product is available in another variant in the selected group, e.g. „Medaillon“ in „250g“ in „Frisch“ is also available as  „Medaillon“ in „250g“ in „Schockgefrostet“  #}
  10.         {% set availableClass = 'available-option--combinable' %}
  11.     {% elseif option.id in page.product.extension('availableOptions').all() %}
  12.         {# There is at least one available combination available for this option #}
  13.         {# E.g. „Medaillon“ in „250g“ in „Frisch“ is selected but there is a „Filet“ in "350g" in „Frisch“ #}
  14.         {# -> Available options but not combinable #}
  15.         {% set availableClass = 'available-option--available' %}
  16.     {% endif %}
  17.     <label class="product-detail-configurator-option-label available-option {% if availableClass %}{{ availableClass }}{% endif %} is-display-{{ displayType }}"
  18.             {% if displayType == 'color' and option.colorHexCode %}
  19.             style="background-color: {{ option.colorHexCode }}"
  20.             {% endif %}
  21.             title="{{ option.translated.name }}"
  22.             for="{{ optionIdentifier }}">
  23.         {% if displayType == 'media' and media %}
  24.             {% block page_product_detail_configurator_option_radio_label_media %}
  25.                 {{parent()}}
  26.             {% endblock %}
  27.         {% elseif displayType == 'text' or
  28.                     (displayType == 'media' and not media) or
  29.                     (displayType == 'color' and not option.colorHexCode) %}
  30.             {% block page_product_detail_configurator_option_radio_label_text %}
  31.                 {{ parent() }}
  32.             {% endblock %}
  33.         {% endif %}
  34.     </label>
  35. {% endblock %}