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

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/component/buy-widget/buy-widget.html.twig' %}
  2. {% set SwpSampleOrderSixConfig = config('SwpSampleOrderSix.config') %}
  3. {% block buy_widget_price %}
  4.     {{ parent() }}
  5.     {# @var product \Shopware\Core\Content\Product\SalesChannel\SalesChannelProductEntity #}
  6.     {% set product = page.product %}
  7.     {% if SwpSampleOrderSixConfig.channelActive is same as(true)
  8.         and product.customFields.sample_order_six_flag == true %}
  9.         {% block page_product_detail_price_sample %}
  10.             {% if product.extensions.calculatedSamplePrice.unitPrice is empty %}
  11.                 <div class="product-detail-sample-price">
  12.                     <span class="product-detail-sample-price-label">
  13.                         {{ "swp-sampleorder.detail.SamplePriceFree"|trans|sw_sanitize }}
  14.                     </span>
  15.                 </div>
  16.             {% else %}
  17.                 <div class="product-detail-sample-price">
  18.                     <span class="product-detail-sample-price-label">
  19.                         {{ "swp-sampleorder.detail.SamplePrice"|trans|sw_sanitize }}:
  20.                     </span>
  21.                     <span class="product-detail-sample-price-price">
  22.                         {{ product.extensions.calculatedSamplePrice.unitPrice|currency }}{{ "general.star"|trans|sw_sanitize }}
  23.                     </span>
  24.                 </div>
  25.             {% endif %}
  26.         {% endblock %}
  27.     {% endif %}
  28. {% endblock %}