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

Open in your IDE?
  1. {% if productHistory|length > 0 %}
  2.     <section class="products-subSection">
  3.         <h3 class="mod-hl-02">
  4.             <span class="isJp">最近チェックした商品</span>
  5.         </h3>
  6.         <div class="mod-products-list">
  7.             {% for Checkitem in productHistory %}
  8.                 {% set CheckitemProduct = repository('Eccube\\Entity\\Product').find(Checkitem.id) %}
  9.                 <article class="productsBox">
  10.                     <a href="{{ url('product_detail', {'id': CheckitemProduct.id}) }}" class="productsBoxInner">
  11.                         <span class="productsBox-img">
  12.                             <span class="imgInner">
  13.                                 <img src="{{ asset(CheckitemProduct.main_list_image|no_image_product, 'save_image') }}" alt="" class="imgObjectFitCover">
  14.                                 {% if not CheckitemProduct.stock_find %}
  15.                                     <div class="is-soldout">
  16.                                         <span>SOLD OUT</span>
  17.                                     </div>
  18.                                 {% endif %}
  19.                             </span>
  20.                         </span>                                                    
  21.                         <h4 class="productsBox-hl">{{Checkitem.name}}</h4>
  22.                         <p class="productsBox-text">
  23.                             {% if Checkitem.hasProductClass %}
  24.                                 {% if Checkitem.getPrice02Min == Checkitem.getPrice02Max %}
  25.                                     {{ Checkitem.getPrice02IncTaxMin|number_format }}
  26.                                 {% else %}
  27.                                     {{ Checkitem.getPrice02IncTaxMin|number_format }}
  28.                                     ~
  29.                                     {{ Checkitem.getPrice02IncTaxMax|number_format }}
  30.                                 {% endif %}
  31.                             {% else %}
  32.                                 {{ Checkitem.getPrice02IncTaxMin|number_format }}
  33.                             {% endif %}
  34.                             円<small class="isSmall">税込</small>
  35.                         </p>                                                        
  36.                     </a>
  37.                 </article>                        
  38.             {% endfor %}            
  39.         </div>
  40.     </section>
  41.     <style>
  42.         .is-soldout{
  43.             background-color: rgba(0, 0, 0, 0.5);
  44.             text-align: center;
  45.             position: absolute;
  46.             color: #fff;
  47.             font-size: 1.4rem;
  48.             margin: 0 !important;
  49.             padding: 0 !important;
  50.             width: 100%;
  51.             height: 100%;
  52.         }
  53.         .is-soldout span{
  54.             position: relative;
  55.             display: block;
  56.             height: 100%;
  57.             top: 40%;
  58.         }
  59.         @media only screen and (min-width: 600px)and (max-width: 1023px){
  60.             .is-soldout{
  61.                 font-size: 1.3rem;
  62.             }
  63.         }
  64.     </style>
  65. {% endif %}