{% block page_product_detail_configurator_group_select %}
{% block page_product_detail_configurator_group_select_title %}
{% set currentUrl = app.request.attributes.get("sw-original-request-uri") %}
{% if currentUrl starts with '/widgets/cms/buybox' %}
<label class="product-detail-configurator-group-title" for="{{ group.id }}" style="font-size: 16px !important; color: black !important;">
{% else %}
<label class="product-detail-configurator-group-title" for="{{ group.id }}" style="font-size: 22px !important; color: black !important;">
{% endif %}
{% block page_product_detail_configurator_group_title_text %}
{{ group.translated.name }}
{% endblock %}
</label>
{% set defaultOption = false %}
{% if currentUrl|slice(-1) == '0' %}
{% set defaultOption = true %}
{% endif %}
{% block page_product_detail_configurator_select %}
{% if page.cmsPage.type == 'landingpage' and 'minisolar' in page.cmsPage.name %}
{% endif %}
{% if currentUrl starts with '/widgets/cms/buybox' %}
{# fühlt sich sehr nach Hack an #}
{% set selectedOptionBuyBox = app.request.get('options')[-34:-2] %}
{% else %}
{% set selectedOptionBuyBox = '' %}
{% endif %}
<select name="{{ group.id }} configuratorId" id="{{ group.id }}"
class="{{ formSelectClass }} product-detail-configurator-select-input configuratorSelectClass">
{% if not data.get(group.id) and defaultOption != "" %}
<option data-default-option="{{ defaultOption }}" selected="selected"
value="">
{{ "emova.label.selectAnOptionPlaceHolder"|trans|sw_sanitize }}
</option>
{% endif %}
{% for option in group.options %}
{% set selected = false %}
{% if defaultOption == false %}
{% if option.id in page.product.optionIds %}
{% set selected = true %}
{% endif %}
{% if option.id in product.optionIds %}
{% set selected = true %}
{% endif %}
{% endif %}
{% block page_product_detail_configurator_select_option %}
<option data-default-option="{{ defaultOption }}" {% if selected == true or option.id == data.get(group.id) or option.id == selectedOptionBuyBox %}
selected="selected"
{% endif %}
value="{{ option.id }}">
{{ option.translated.name }}
</option>
{% endblock %}
{% endfor %}
</select>
{% endblock %}
{% endblock %}
{% endblock %}