themes/BootstrapChildTheme/SyliusShopBundle/views/Product/Show/_priceVariant.html.twig line 1

Open in your IDE?
  1. {% import "@SyliusShop/Common/Macro/money.html.twig" as money %}
  2. {#{% set hasDiscount = variant|money.has_discount({'channel': sylius.channel}) %}#}
  3. {% set discount = money.calculateDiscount(variant, {'channel': sylius.channel, 'zone': sylius.channel.defaultTaxZone })  %}
  4. {% set price = money.calculatePriceWithTax(variant)  %}
  5. {% set originalPrice = money.calculateOriginalPriceWithTax(variant, {'channel': sylius.channel, 'zone': sylius.channel.defaultTaxZone })  %}
  6. <span data-js-product-price-group class="price-group">
  7.     <span class="original-price strike" data-js-product-original-price style="display: {{ discount.__toString != 0 ? 'inline' : 'none' }}" {{ sylius_test_html_attribute('product-original-price', money.calculateOriginalPrice(variant)) }}>
  8.         {{ originalPrice }}
  9.     </span>
  10.     <span class="price" class="main-price" data-js-product-price {{ sylius_test_html_attribute('product-price', money.calculatePrice(variant)) }}>
  11.         {{ money.calculatePriceWithTax(variant) }}
  12.     </span>
  13.     <span class="discount" data-js-product-discount style="display: {{ discount.__toString != 0 ? 'inline' : 'none' }}">(-{{ discount }} %)</span><br>
  14. </span>