app/Resources/views/product/product_teaser.html.twig line 6

Open in your IDE?
  1. <div class="card custom-product-card mb-4 shadow-sm flex-fill" data-productid="{{ product.id }}">
  2.     {% set detailLink = app_product_detaillink(product) %}
  3.     <a href="{{ detailLink }}" class="text-decoration-none text-dark">
  4.         {% if(product.mainImage) %}
  5.         <div class="product-img">
  6.             {{ product.mainImage.thumbnail('grid').html({class: 'img-fluid w-100'}) | raw }}
  7.         </div>
  8.         {% endif %}
  9.         <div class="card-body pricing">
  10.             <div class="card-body-top pb-3">
  11.                 <h4 class="card-title pricing-card-title text-uppercase">{{ product.oSName }}</h4>
  12.                 {% if( product is instanceof('AppBundle\\Model\\Product\\Car')) %}
  13.                     <p class="card-text">{{ product.subText | raw }}</p>
  14.                 {% elseif(product.saleInformation.saleInformation)  %}
  15.                     <p class="card-text">{{ 'general.condition' | trans }}: {{ ('attribute.' ~ product.saleInformation.saleInformation.condition) | trans }}</p>
  16.                 {% endif %}
  17.             </div>
  18.             <div class="card-body-bottom">
  19.                 {% set priceInfo = product.oSPriceInfo %}
  20.                 {% if(priceInfo.hasDiscount) %}
  21.                     <p class="card-price original mb-1">{{ priceInfo.originalPrice }}</p>
  22.                 {% endif %}
  23.                 <p class="card-price">{{ product.oSPrice }}</p>
  24.                 <div class="row button-row">
  25.                     <div class="col p-1">
  26.                         <a href="{{ detailLink }}" class="btn btn-block btn-secondary">
  27.                             {{ 'general.details' | trans }}
  28.                         </a>
  29.                     </div>
  30.                     <div class="col p-1">
  31.                         <a href="{{ path('shop-add-to-cart', { id: product.id }) }}" class="btn btn-block btn-primary">{{ 'general.buy' | trans }} <i class=" ml-2"><img src="/static/images/icons/cart.svg" height="20" width="auto"></i></a>
  32.                     </div>
  33.                 </div>
  34.             </div>
  35.         </div>
  36.     </a>
  37. </div>