vendor/sylius/sylius/src/Sylius/Bundle/ShopBundle/Resources/views/Product/Box/_content.html.twig line 1

  1. {% import "@SyliusShop/Common/Macro/money.html.twig" as money %}
  2. <div class="ui fluid card" {{ sylius_test_html_attribute('product') }}>
  3.     <a href="{{ path('sylius_shop_product_show', {'slug': product.slug, '_locale': product.translation.locale}) }}" class="blurring dimmable image">
  4.         <div class="ui dimmer">
  5.             <div class="content">
  6.                 <div class="center">
  7.                     <div class="ui inverted button">{{ 'sylius.ui.view_more'|trans }}</div>
  8.                 </div>
  9.             </div>
  10.         </div>
  11.         {% include '@SyliusShop/Product/_mainImage.html.twig' with {'product': product} %}
  12.     </a>
  13.     <div class="content" {{ sylius_test_html_attribute('product-content') }}>
  14.         <a href="{{ path('sylius_shop_product_show', {'slug': product.slug, '_locale': product.translation.locale}) }}" class="header sylius-product-name" {{ sylius_test_html_attribute('product-name', product.name) }}>{{ product.name }}</a>
  15.         {% if not product.enabledVariants.empty() %}
  16.             {% set variant = product|sylius_resolve_variant %}
  17.             {% set price = money.calculatePrice(variant) %}
  18.             {% set originalPrice = money.calculateOriginalPrice(variant) %}
  19.             {% set appliedPromotions = variant.getAppliedPromotionsForChannel(sylius.channel) %}
  20.             {% include '@SyliusShop/Product/Show/_catalogPromotionLabels.html.twig' with {'appliedPromotions': appliedPromotions, 'withDescription': false} %}
  21.             {% if variant|sylius_has_discount({'channel': sylius.channel}) %}
  22.             <div class="sylius-product-original-price" {{ sylius_test_html_attribute('product-original-price') }}><del>{{ originalPrice }}</del></div>
  23.             {% endif %}
  24.             <div class="sylius-product-price" {{ sylius_test_html_attribute('product-price') }}>{{ price }}</div>
  25.         {% endif %}
  26.     </div>
  27. </div>