app/template/flapshop/Mypage/favorite.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 mypageno = 'favorite' %}
  10. {% set body_class = 'mypage' %}
  11. {% block main %}
  12.     <div class="ec-layoutRole__main">
  13.         <div class="ec-mypageRole">
  14.             <div class="ec-pageHeader">
  15.                 <h1>{{ 'マイページ'|trans }}/{{ 'お気に入り一覧'|trans }}</h1>
  16.             </div>
  17.             {% include 'Mypage/navi.twig' %}
  18.         </div>
  19.         <div class="ec-mypageRole">
  20.             <div class="ec-favoriteRole">
  21.                 {% if pagination.totalItemCount > 0 %}
  22.                     <div class="ec-favoriteRole__header">
  23.                         <p>{{ '%count%件のお気に入りがあります'|trans({'%count%':pagination.totalItemCount}) }}</p>
  24.                     </div>
  25.                     <div class="ec-favoriteRole__detail">
  26.                         <ul class="ec-favoriteRole__itemList">
  27.                             {% for FavoriteProduct in pagination %}
  28.                                 {% set Product = FavoriteProduct.Product %}
  29.                                 <li class="ec-favoriteRole__item">
  30.                                     <a class="ec-closeBtn--circle"
  31.                                        href="{{ url('mypage_favorite_delete', { id : Product.id }) }}" {{ csrf_token_for_anchor() }}
  32.                                        data-method="delete">
  33.                                         <div class="ec-icon">
  34.                                             <img src="{{ asset('assets/icon/cross-white.svg') }}" alt="close">
  35.                                         </div>
  36.                                     </a>
  37.                                     <a class="ec-favoriteRole__itemThumb" href="{{ url('product_detail', {'id': Product.id}) }}">
  38.                                         <p class="ec-favoriteRole__item-image">
  39.                                             <img src="{{ asset(Product.main_list_image|no_image_product, 'save_image') }}">
  40.                                         </p>
  41.                                     </a>
  42.                                     <p class="ec-favoriteRole__itemTitle">{{ Product.name }}</p>
  43.                                     <p class="ec-favoriteRole__itemPrice">
  44.                                         {% if Product.price02_inc_tax_min == Product.price02_inc_tax_max %}
  45.                                             {{ Product.price02_inc_tax_min|price }}
  46.                                         {% else %}
  47.                                             {{ Product.price02_inc_tax_min|price }}~{{ Product.price02_inc_tax_max|price }}
  48.                                         {% endif %}
  49.                                     </p>
  50.                                 </li>
  51.                             {% endfor %}
  52.                         </ul>
  53.                     </div>
  54.                     <div class="ec-pagerRole">
  55.                         {% include "pager.twig" with {'pages': pagination.paginationData} %}
  56.                     </div>
  57.                 {% else %}
  58.                     <div class="ec-favoriteRole__header">{{ 'お気に入りは登録されていません。'|trans }}</div>
  59.                 {% endif %}
  60.             </div>
  61.         </div>
  62.     </div>
  63. {% endblock %}