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_page' %}
  10. {% block stylesheet %}
  11. {% endblock %}
  12. {% block javascript %}
  13.     <script>
  14.         eccube.productsClassCategories = {
  15.             {% for Product in pagination %}
  16.             "{{ Product.id|escape('js') }}": {{ class_categories_as_json(Product)|raw }}{% if loop.last == false %}, {% endif %}
  17.             {% endfor %}
  18.         };
  19.     </script>
  20. {% endblock %}
  21. {% block main %}
  22.     {% if search_form.category_id.vars.errors|length > 0 %}
  23.         <div class="ec-searchnavRole">
  24.             <p class="errormsg text-danger">{{ 'ご指定のカテゴリは存在しません'|trans }}</p>
  25.         </div>
  26.     {% else %}
  27.         <div class="c_inner">
  28.           <div class="list_header">
  29.             <h2 class="ttl"><small class="ft_e">Search results</small><i></i></h2>
  30.           </div>
  31.           <p class="list_reslut ft_e"><em>{{ '%count%'|trans({ '%count%': pagination.totalItemCount })|raw }}</em>products</p>
  32.         </div>
  33.         {% if pagination.totalItemCount > 0 %}
  34.             <div class="c_bg">
  35.                 <ul class="item_list a">
  36.                     {% for Product in pagination %}
  37.                         {% if date('-30days') < Product.create_date %}<li class="new">{% else %}<li>{% endif %}
  38.                             <a href="{{ url('product_detail', {'id': Product.id}) }}">
  39.                                 <img src="{{ asset(Product.main_list_image|no_image_product, 'save_image') }}" alt="{{ Product.name }}" {% if loop.index > 5 %} loading="lazy"{% endif %}>
  40.                                 <dl>
  41.                                     <dt>{{ Product.brand }}<br>
  42.                                     <dt>{{ Product.name }}</dt>
  43.                                     <dd class="price">
  44.                                     {% for prdClass in Product.ProductClasses %}
  45.                                     {% if prdClass.ClassCategory1 is not empty %}
  46.                                     {% if not ("併設スタジオ利用時のみ" in prdClass.ClassCategory1.name) %}
  47.                                     <p>{{ prdClass.ClassCategory1.name }}<i>{{ prdClass.price01|price }}</i></p>
  48.                                     {% endif %}
  49.                                     {% endif %}
  50.                                     {% endfor %}
  51.                                     </dd>
  52.                                     <dd>{{ Product.number }}</dd>
  53.                                 </dl>
  54.                             </a>
  55.                             <div class="favo">
  56.                               <form action="{{ url('product_add_favorite', {id:Product.id}) }}" method="post">
  57.                                 {% if Product.SearchWord is empty %}
  58.                                     <button type="submit" class="favorite" title="{{ 'お気に入りに追加'|trans }}"></button>
  59.                                 {% else %}
  60.                                     <button type="submit" class="favorite done" disabled="disabled" title="{{ 'お気に入りに追加済です。'|trans }}"></button>
  61.                                 {% endif %}
  62.                               </form>
  63.                             </div>
  64.                         </li>
  65.                     {% endfor %}
  66.                 </ul>
  67.             </div>
  68.             <div class="ec-pagerRole">
  69.                 {% include "pager.twig" with {'pages': pagination.paginationData} %}
  70.             </div>
  71.         {% endif %}
  72.     {% endif %}
  73. {% endblock %}