app/template/user_data/components/mypage/coupon.twig line 1

Open in your IDE?
  1. <ul id="use_Coupon" class="customer_check_list up">
  2.     {% for Coupon in couponPro %}
  3.         <!-- ☆☆ CHECK ONE ☆☆-->
  4.         <li class="one_check type_check" style="margin-right: auto;">
  5.             <a {% if Coupon.trans_url %} href="{{ Coupon.trans_url }}" target="_blank" {% endif %} style="text-decoration: none; color: inherit;">
  6.                 <aside class="coupon_box type-{{Coupon.CouponKind.id == 2 ? 'percent' : 'yen'}}_off" style="display: flex; flex-direction: column; height: 100%">
  7.                     <div class="coupon_titlebox">
  8.                         <p class="tiny">{{Coupon.coupon_name}}</p>
  9.                         <h5 class="coupon_title">{{Coupon.CouponKind.id == 2 ? Coupon.discount_rate : (Coupon.discount_price | round )}}{{Coupon.CouponKind.id == 2 ? '%':'円'}}
  10.                             OFF</h5>
  11.                     </div>
  12.                     <!-- /// .coupon_titlebox *** /// -->
  13.                     <div class="coupon_main" style="flex: 1;">
  14.                         <p class="coupon_caution">有効期限:{{ Coupon.available_to|date('Y年n月j日') }}まで</p>
  15.                         <div class="coupon-wrap-list-sub">
  16.                             <div>
  17.                                 <dl class="coupon_detail">
  18.                                     <dt>{{ 'front.mypage.coupon.terms_of_use'|trans }}</dt>
  19.                                     <dd>
  20.                                         {% set useConditions = [] %}
  21.                                         {% if Coupon.issued %}
  22.                                             {% set useConditions = useConditions|merge(['front.mypage.coupon.issued_format'|trans({'%issued%':Coupon.issued})]) %}
  23.                                         {% endif %}
  24.                                         {% if Coupon.min_price %}
  25.                                             {% set useConditions = useConditions|merge([Coupon.min_price|number_format~'front.mypage.coupon.min_price_format'|trans]) %}
  26.                                         {% endif %}
  27.                                         {% if Coupon.customer_available %}
  28.                                             {% set useConditions = useConditions|merge(['front.mypage.coupon.customer_available'|trans({'%customer_available%':Coupon.customer_available})]) %}
  29.                                         {% endif %}
  30.                                         {% if useConditions is empty %}
  31.                                             {{ 'front.mypage.coupon.terms_of_use.nothing'|trans }}
  32.                                         {% else %}
  33.                                             {{ useConditions|join('、') }}
  34.                                         {% endif %}
  35.                                     </dd>
  36.                                 </dl>
  37.                                 <dl class="coupon_detail">
  38.                                     <dt>{{ 'front.mypage.coupon.target_category'|trans }}</dt>
  39.                                     <dd>
  40.                                         {% if Coupon.getTargetCategories is not empty %}
  41.                                             {% for CategoryId, CategoryName in Coupon.getTargetCategories|slice(0, 3, true) %}
  42.                                                 {% if not loop.first %}
  43.                                                     、
  44.                                                 {% endif %}
  45.                                                 <object>{{ CategoryName }}</object>
  46.                                             {% endfor %}
  47.                                             {% if Coupon.getTargetCategories | length > 3 %}
  48.                                                 など
  49.                                             {% endif %}
  50.                                         {% else %}
  51.                                             {{ 'front.mypage.coupon.terms_of_use.nothing'|trans }}
  52.                                         {% endif %}
  53.                                     </dd>
  54.                                 </dl>
  55.                                 <dl class="coupon_detail">
  56.                                     <dt>{{ 'common.coupon.target_product'|trans }}</dt>
  57.                                     <dd>
  58.                                         {% if Coupon.getTargetProducts is not empty %}
  59.                                             {% for ProductId, ProductName in Coupon.getTargetProducts|slice(0, 3, true) %}
  60.                                                 {% if not loop.first %}
  61.                                                     、
  62.                                                 {% endif %}
  63.                                                 {% if Coupon.issued %}
  64.                                                     <object>{{ ProductName }}</object>
  65.                                                 {% else %}
  66.                                                     <object>
  67.                                                         <a class="coupon-wrap-list-sub-link" href="/product/{{ ProductId }}">
  68.                                                             {{ ProductName }}
  69.                                                         </a>
  70.                                                     </object>
  71.                                                 {% endif %}
  72.                                             {% endfor %}
  73.                                             {% if Coupon.getTargetProducts | length > 3 %}
  74.                                                 など
  75.                                             {% endif %}
  76.                                         {% else %}
  77.                                             {{ 'front.mypage.coupon.terms_of_use.nothing'|trans }}
  78.                                         {% endif %}
  79.                                     </dd>
  80.                                 </dl>
  81.                             </div>
  82.                         </div>
  83.                         <!-- /// .coupon_main *** /// -->
  84.                         <!-- /// *** .coupon_box *** /// -->
  85.                     </div>
  86.                 </aside>
  87.             </a>
  88.         </li>
  89.     {% endfor %}
  90.     <!-- /// *** .customer_check_list *** /// -->
  91. </ul>