{% sw_extends '@Storefront/storefront/component/product/card/price-unit.html.twig' %}
{% block component_product_box_price %}
{{ parent() }}
{% if config('NetiNextEasyCoupon.config.active')
and config('NetiNextEasyCoupon.config.showExtraOptionsInListing') is not same as('no')
and config('NetiNextEasyCoupon.config.showExtraOptionsInListing') is not null
%}
<div class="neti-ec-extra-options">
{% if product.extensions is defined
and product.extensions.netiEasyCouponProduct is defined
and product.extensions.netiEasyCouponProduct.extensions.extraOptions is defined
and product.extensions.netiEasyCouponProduct.extensions.extraOptions.elements is not empty
%}
<div class="neti-ec-extra-options-text">
{% for extraOption in product.extensions.netiEasyCouponProduct.extensions.extraOptions.elements %}
{% if
extraOption.selectionType is same as(constant('NetInventors\\NetiNextEasyCoupon\\Core\\Content\\Product\\Extension\\ExtraOption\\EcProductExtraOptionEntity::SELECTION_TYPE_PRESELECTED_AND_UNCHANGEABLE'))
or config('NetiNextEasyCoupon.config.showExtraOptionsInListing') is same as('all')
%}
<span class="neti-ec-extra-options-option">
{{ "neti-easy-coupon.store-front.listing.extra-option.price"|trans({'%price%': extraOption.calculatedPrice|currency, '%label%': extraOption.translated.label, '%star%': "general.star"|trans|sw_sanitize }) }}
</span>
{{ "neti-easy-coupon.store-front.listing.extra-option.label"|trans({'%price%': extraOption.calculatedPrice|currency, '%label%': extraOption.translated.label, '%star%': "general.star"|trans|sw_sanitize }) }}
{% if extraOption.selectionType is not same as(constant('NetInventors\\NetiNextEasyCoupon\\Core\\Content\\Product\\Extension\\ExtraOption\\EcProductExtraOptionEntity::SELECTION_TYPE_PRESELECTED_AND_UNCHANGEABLE')) %}
{{ "neti-easy-coupon.store-front.listing.extra-option.optional"|trans }}
{% endif %}
{% if product.extensions.netiEasyCouponProduct.extensions.extraOptions.elements|last != extraOption %}
{{ "neti-easy-coupon.store-front.listing.extra-option.separator"|trans }}
{% endif %}
{% endif %}
{% endfor %}
</div>
{% endif %}
</div>
{% endif %}
{% endblock %}