public/themes/default/cards/single-product.html.twig line 1

Open in your IDE?
  1. <div class="product-card mb-3 shadow-unset">
  2.     <div class="product-head">
  3.         <div class="rating-stars">
  4.             {#                                        {% for i in 1..5 %} #}
  5.             {#                                            <i class="mdi mdi-star {{ i <= suggestion.rating ? 'active' }}"></i> #}
  6.             {#                                        {% endfor %} #}
  7.         </div>
  8.         {#                                    {% if product.discount %} #}
  9.         {#                                        <div class="discount"><span>{{ product.discount }}%</span></div> #}
  10.         {#                                    {% endif %} #}
  11.     </div>
  12.     <a class="product-thumb" href="{{ path('app_shop_site_product' , {'urlSlug' : product.urlSlug}) }}">
  13.         {% if product.productImages|length > 0 %}
  14.             <img src="{{ product.productImages[0].imageUrl }}" alt="">
  15.         {% elseif product.imageUrl is defined and product.imageUrl is not null %}
  16.             <img src="{{ product.imageUrl }}" alt="">
  17.         {% else %}
  18.             <img src="/default.jpg" alt="">
  19.         {% endif %}
  20.     </a>
  21.     <div class="product-card-body">
  22.         <h5 class="product-title">
  23.             <a style="font-size: 0.8rem;
  24.     line-height: 1.2rem;" href="{{ path('app_shop_site_product' , {'urlSlug' : product.urlSlug}) }}">
  25.                 {{ product.name|length > 50 ? product.name|slice(0, 50) ~ '...' : product.name  }}
  26.             </a>
  27.         </h5>
  28.         {% set firstCategory = product.productCategories|first %}
  29.         {% if firstCategory %}
  30.             <a class="product-meta" href="#">{{ firstCategory.name }}</a>
  31.         {% endif %}
  32.         <span class="product-price">{{ product.displayPrice|number_format }} تومان</span>
  33.     </div>
  34. </div>