app/Plugin/SalesRankingB4/Resource/template/Block/sales_ranking_block.twig line 1

Open in your IDE?
  1. {# 
  2.   * 
  3.   * カスタムテンプレ /app/template/myufull1/Block/sales_ranking_block.twig が正常に読まれて以内ので強制修正 
  4.   * 
  5. #}
  6. <!-- ▼ranking_list▼ -->
  7. {% block stylesheet %}
  8.   <style>
  9.     .slide-wrap {
  10.       margin-bottom: 20px;
  11.       overflow-y: hidden;
  12.       overflow-x: scroll;
  13.       display: flex;
  14.       -webkit-overflow-scrolling: touch;
  15.       overflow-scrolling: touch;
  16.     }
  17.     @media only screen and (max-width: 767px) {
  18.       .side-box {
  19.         flex: 0 0 40%;
  20.         padding: 0 8px;
  21.       }
  22.     }
  23.     @media only screen and (min-width: 768px) {
  24.       .side-box {
  25.         flex: 0 0 18%;
  26.         padding: 0 8px;
  27.       }
  28.     }
  29.     .inner, .inner img {
  30.       max-width: 100%;
  31.     }
  32.   </style>
  33. {% endblock %}
  34. {% if ranking_products|length > 0 %}
  35.   <div class="ec-shelfRole product-list">
  36.     <h3 class="title-bottom-line mt-3">人気商品ランキング</h3>
  37.     <div class="slide-wrap">
  38.       {% for RankingProduct in ranking_products %}
  39.         <div class="side-box">
  40.           <div class="inner">
  41.             <a href="{{ url('product_detail', {'id': RankingProduct.id}) }}">
  42.               <img src="{{ asset(RankingProduct.mainFileName|no_image_product, "save_image") }}">
  43.               <p>{{ RankingProduct.name }}</p>
  44.               <p class="price02_default">
  45.                 {% if RankingProduct.hasProductClass %}
  46.                   {% if RankingProduct.getPrice02Min == RankingProduct.getPrice02Max %}
  47.                     {{ RankingProduct.getPrice02IncTaxMin|price }}
  48.                   {% else %}
  49.                     {{ RankingProduct.getPrice02IncTaxMin|price }} ~ {{ RankingProduct.getPrice02IncTaxMax|price }}
  50.                   {% endif %}
  51.                 {% else %}
  52.                   {{ RankingProduct.getPrice02IncTaxMin|price }}
  53.                 {% endif %}
  54.               </p>
  55.             </a>
  56.           </div>
  57.         </div>
  58.       {% endfor %}
  59.     </div>
  60.   </div>
  61. {% endif %}
  62. <!-- ▲ranking_list▲ -->
  63. {# 
  64. <!-- ▼ranking_list▼ -->
  65. {% block stylesheet %}
  66.     <style>
  67.         .sales_style {
  68.             padding-top: 60px;
  69.         }
  70.     </style>
  71. {% endblock %}
  72. {% if ranking_products|length > 0 %}
  73. <div class="ec-shelfRole sales_style">
  74.     <div class="ec-secHeading">
  75.         <span class="ec-secHeading__en">{{ 'SALES RANKING'|trans }}</span>
  76.         <span class="ec-secHeading__line"></span>
  77.         <span class="ec-secHeading__ja">{{ '売上ランキング'|trans }}</span>
  78.     </div>
  79.     <ul class="ec-shelfGrid">
  80.         {% for RankingProduct in ranking_products %}
  81.             <li class="ec-shelfGrid__item">
  82.                 <a href="{{ url('product_detail', {'id': RankingProduct.id}) }}">
  83.                     <img src="{{ asset(RankingProduct.mainFileName|no_image_product, "save_image") }}">
  84.                     <dl>
  85.                         {% if display_name_flg == 1 %}
  86.                         <dt class="item_name">{{ RankingProduct.name }}</dt>
  87.                         {% endif %}
  88.                         {% if display_code_flg == 1 %}
  89.                         <dd class="item_code">{{ RankingProduct.code_min }}{% if RankingProduct.code_min != RankingProduct.code_max %} ~ {{ RankingProduct.code_max }}{% endif %}</dd>
  90.                         {% endif %}
  91.                         {% if display_price_flg == 1 %}
  92.                         <dd class="item_price">
  93.                             {% if RankingProduct.hasProductClass %}
  94.                                 {% if RankingProduct.getPrice02Min == RankingProduct.getPrice02Max %}
  95.                                     {{ RankingProduct.getPrice02IncTaxMin|price }}
  96.                                 {% else %}
  97.                                     {{ RankingProduct.getPrice02IncTaxMin|price }} ~ {{ RankingProduct.getPrice02IncTaxMax|price }}
  98.                                 {% endif %}
  99.                             {% else %}
  100.                                 {{ RankingProduct.getPrice02IncTaxMin|price }}
  101.                             {% endif %}
  102.                         </dd>
  103.                         {% endif %}
  104.                         {% if display_description_list_flg == 1 %}
  105.                         <dd class="item_description">{{ RankingProduct.description_list|raw|nl2br }}</dd>
  106.                         {% endif %}
  107.                     </dl>
  108.                 </a>
  109.             </li>
  110.         {% endfor %}
  111.     </ul>
  112. </div>
  113. {% endif %}
  114. <!-- ▲ranking_list▲ -->
  115.  #}