app/template/default/Block/order_by_sale.twig line 1

Open in your IDE?
  1. {% if Products|length %}
  2.     <section class="ranking splide ranking-splide">
  3.         <div class="inner">
  4.             <h2 class="section__heading --center">Ranking<span class="section__sub-heading">ランキング</span></h2>
  5.             <div class="splide__track">
  6.                 <ul class="ranking__list splide__list">
  7.                     {% for Product in Products|slice(0, 5) %}
  8.                         <li class="ranking__item splide__slide">
  9.                             <a href="{{ url('product_detail', {'id': Product.id}) }}" class="ranking__item-link">
  10.                                 <div class="ranking__badge --en --rank{{ loop.index }}"><span class="number">0{{ loop.index }}</span>Ranking</div>
  11.                                 {% if Product.major_heading is not null  %}
  12.                                 <p class="ranking__head"><span>{{Product.major_heading}}</span></p>
  13.                                 {% endif %}
  14.                                 <div class="ranking__body">
  15.                                     <div class="ranking__thumb">
  16.                                         <img src="{{ asset(Product.mainFileName|no_image_product, "save_image") }}" alt="{{ Product.name }}">
  17.                                     </div>
  18.                                     <div class="ranking__desc">
  19.                                     {% for ProductCategory in Product.ProductCategories %}
  20.                                         {% set ParentCategory = ProductCategory.Category %}
  21.                                             {% for ChildCategory in ParentCategory.children %}
  22.                                             <p class="ranking__category">{{ ChildCategory.name }}</p>
  23.                                             {% endfor %}
  24.                                         {% endfor %}
  25.                                         <p class="ranking__name">{{ Product.name }}</p>
  26.                                         {% for spec in Product.ProductSpecs %}
  27.                                             {% if spec.title == '産地' %}
  28.                                             <p class="ranking__area">産地:{{ spec.content|raw|nl2br }}</p>
  29.                                             {% endif %}
  30.                                         {% endfor %}
  31.                                         <p class="ranking__price --en">
  32.                                             {% if Product.hasProductClass %}
  33.                                             {% if Product.getPrice02Min == Product.getPrice02Max %}
  34.                                                 {{ Product.getPrice02IncTaxMin|price }}<span>(税込)</span>
  35.                                             {% else %}
  36.                                                 {{ Product.getPrice02IncTaxMin|price }}<span>(税込)</span>
  37.                                                 ~
  38.                                                 {{ Product.getPrice02IncTaxMax|price }}<span>(税込)</span>
  39.                                             {% endif %}
  40.                                         {% else %}
  41.                                             {{ Product.getPrice02IncTaxMin|price }}<span>(税込)</span>
  42.                                         {% endif %}
  43.                                         </p>
  44.                                     </div>
  45.                                 </div>
  46.                             </a>
  47.                         </li>
  48.                     {% endfor %}
  49.                 </ul>
  50.             </div>
  51.         </div>
  52.     </section>
  53. {% endif %}