templates/product/product_teaser.html.twig line 1

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({imgAttributes: {class: 'img-fluid w-100'}}) | raw }}
  7.         </div>
  8.         {% endif %}
  9.         <div class="card-body pricing">
  10.             <div class="card-body-top mt-8 mb-8">
  11.                 <h4 class="card-title pricing-card-title text-uppercase mt-4">{{ product.name }}</h4>
  12.                  <p class="card-text">{{ product.country | raw }}
  13.                 {% if( product is instanceof('App\\Model\\Product\\Car')) %}
  14.                     {# <p class="card-text">{{ product.subText | raw }}</p> #}
  15.                 {% elseif(product.saleInformation.saleInformation)  %}
  16.                   {#   <p class="card-text">{{ 'general.condition' | trans }}: {{ ('attribute.' ~ product.saleInformation.saleInformation.condition) | trans }}</p> #}
  17.                 {% endif %}
  18.             </div>
  19.             <div class="card-body-bottom">
  20.                 {% set priceInfo = product.oSPriceInfo %} 
  21.                     {#
  22.                 {% if(priceInfo.hasDiscount) %}
  23.                     <p class="card-price original mb-1">{{ priceInfo.originalPrice }}</p>
  24.                 {% endif %} #}
  25.                {# <p class="card-price">{{ product.oSPrice }}</p> #}
  26.                 <div class="row button-row mt-4 text-center align-items-center">
  27.                     <div class="col p-1">
  28.                         <a href="{{ detailLink }}" class="btn btn-block btn-primary ">
  29.                             {{ 'general.details' | trans }}
  30.                         </a>
  31.                     </div>
  32.                     {# <div class="col p-1">
  33.                         <a href="{{ path('shop-add-to-cart', { id: product.id }) }}" class="btn btn-block btn-primary mt-4">{{ 'general.buy' | trans }} <i class=" ml-2"><img src="/static/images/icons/cart.svg" height="20" width="auto"></i></a> 
  34.                     </div> #}
  35.                 </div>
  36.             </div>
  37.         </div>
  38.     </a>
  39. </div>