themes/BootstrapTheme/templates/bundles/SyliusShopBundle/Product/Show/_price.html.twig line 1

Open in your IDE?
  1. {% import "@SyliusShop/Common/Macro/money.html.twig" as money %}
  2. {% set variant = product|sylius_resolve_variant %}
  3. {% set channelpricing = variant.getChannelPricingForChannel(sylius.channel) %}
  4. {% set percentage =  channelpricing.getDiscountedPercentage %}
  5. {% set context = {"channel": sylius.channel} %}
  6. <div id="article-price-box">
  7.     <strong data-js-product-price id="product-price" class="article-promo">{{ money.calculatePriceWithTax(product|sylius_resolve_variant, context) }}</strong>
  8.     <span class="article-normal line-through" data-js-product-original-price {{ sylius_test_html_attribute('product-price', money.calculatePrice(product|sylius_resolve_variant)) }}>
  9.     {%  set variant = product|sylius_resolve_variant %}
  10.         {% set channelpricing = variant.getChannelPricingForChannel(sylius.channel) %}
  11.         {% if channelpricing.originalPrice > channelpricing.price  %}
  12.             {{ money.calculateOriginalPriceWithTax(product|sylius_resolve_variant, context) }}
  13.         {% endif %}
  14.     </span>
  15. </div>