app/template/default/Product/list.twig line 1

Open in your IDE?
  1. {#
  2. This file is part of EC-CUBE
  3. Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
  4. http://www.ec-cube.co.jp/
  5. For the full copyright and license information, please view the LICENSE
  6. file that was distributed with this source code.
  7. #}
  8. {% extends 'default_frame.twig' %}
  9. {% set body_class = 'product-archive-page' %}
  10. {% set title = '商品一覧' %}
  11. {% block main %}
  12. <section class="product">
  13.   <div class="container product__container">
  14.     <div class="product__head inview-custom">
  15.       <h1 class="product__title">PRODUCT</h1>
  16.     </div>
  17.     <div class="product__body inview">
  18.       <div class="product__sort product-sort">
  19.       </div>
  20.       {% if pagination.totalItemCount > 0 %}
  21.       <ul class="product__list">
  22.         {% for Product in pagination %}
  23.         <li class="product__item">
  24.           <div class="product__item-thumb">
  25.             <img src="{{ asset(Product.main_list_image|no_image_product, 'save_image') }}" alt="{{ Product.name }}" {% if loop.index > 5 %} loading="lazy"{% endif %}>
  26.           </div>
  27.           <div class="product__item-body">
  28.             <h2 class="product__item-title">{{ Product.name }}</h2>
  29.             <p class="product__item-price">
  30.             {% if Product.subscription_discount_rate is defined and Product.subscription_discount_rate > 0 %}
  31.               {% set discount_rate = Product.subscription_discount_rate %}
  32.               {% set original_price = Product.getPrice02IncTaxMin %}
  33.               {% set discounted_price = (original_price * (100 - discount_rate) / 100)|round(0, 'floor') %}
  34.               <span class="product__item-discount" style="color: red; font-weight: bold; margin-right: 10px;">-{{ discount_rate }}%</span>
  35.               <span>{{ discounted_price|price }}(税込)</span>
  36.               <br>
  37.               <span style="font-size: 0.9em; color: #999;">参考価格:
  38.               <span style="text-decoration: line-through;">{{ original_price|price }}(税込)</span>
  39.               </span>
  40.             {% else %}
  41.               <span>{{ Product.getPrice02IncTaxMin|price }}(税込)</span>
  42.             {% endif %}
  43.             </p>
  44.             {% if not Product.subscription %}
  45.             <a href="{{ url('product_detail', {'id': Product.id}) }}" class="product__item-btn">予約購入</a>
  46.             {% else %}
  47.             <a href="{{ url('product_detail', {'id': Product.id}) }}" class="product__item-btn">予約購入</a>
  48.             {% endif %}
  49.             <p style="color: red; padding: 5px 0; font-size: 12px;text-align: center;">※ こちらの商品は2月上旬にお届け予定です。</p>
  50.           </div>
  51.         </li>
  52.         {% endfor %}
  53.       </ul>
  54.       {% endif %}
  55.       {% include "pager.twig" with {'pages': pagination.paginationData} %}
  56.     </div>
  57.   </div>
  58. </section>
  59. {% endblock %}