themes/BootstrapChildTheme/SyliusShopBundle/views/Product/Box/_content_inline.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 hasDiscount = variant ? variant|sylius_has_discount({'channel': sylius.channel}) : null %}
  4. {% set discount = variant ? money.calculateDiscount(variant, {'channel': sylius.channel, 'zone': sylius.channel.defaultTaxZone}) : null %}
  5. {% set tier_prices = variant ? variant.getTierPricesForChannel(sylius.channel, sylius.customer) : null %}
  6. <div class="product-inline" {{ sylius_test_html_attribute('product') }}>
  7.     <a class="product-image-link link-heading me-4"
  8.        href="{{ path('sylius_shop_product_show', {'slug': product.slug, '_locale': product.translation.locale}) }}">
  9.         {% include '@SyliusShop/Product/_mainImage.html.twig' with {'product': product, 'class': 'card-img-top'} %}
  10.     </a>
  11.     <div class="product-content">
  12.         <div class="product-content-top">
  13.             <h6 class="product-name fw-medium cfs-5" {{ sylius_test_html_attribute('product-name', product.name) }}>
  14.                 <a class="link-heading stretched-link" href="{{ path('sylius_shop_product_show', {'slug': product.slug, '_locale': product.translation.locale}) }}">{{ product.name }}</a>
  15.             </h6>
  16.         </div>
  17.         <div class="product-content-bottom">
  18.             <div class="product-price-wrap">
  19.                 {% if not product.enabledVariants.empty() %}
  20.                     {% if product.minPrice %}
  21.                         <span class="text-nowrap">
  22.                             <span class="product-price-from cfs-8">{{ 'app.ui.price_from'|trans }}</span>
  23.                             <span class="product-price cfs-7" {{ sylius_test_html_attribute('product-price') }}>{{ money.convertAndFormatSpecial(product.minPrice, {'divisor': 100000, 'scale': 3 }) }}</span>
  24.                         </span>
  25.                         {% if product.maxPrice %}
  26.                             <span class="text-nowrap">
  27.                                 <span class="product-price-from cfs-8">{{ 'app.ui.price_to'|trans }}</span>
  28.                                 <span class="product-price min-price cfs-7" {{ sylius_test_html_attribute('product-price') }}>{{ money.convertAndFormatSpecial(product.maxPrice, {'divisor': 100000, 'scale': 3 }) }}</span>
  29.                             </span>
  30.                         {% endif %}
  31.                     {% endif  %}
  32.                 {% endif %}
  33.             </div>
  34.         </div>
  35.     </div>
  36. </div>