app/template/default/Block/Sp/Item/lm_item_best_sells.twig line 1

Open in your IDE?
  1. <!-- 売れ筋 -->
  2.   {% if popularData|length >= 1 %}
  3.     {% set sameCatRecommendTitle = 'おすすめ商品はこちら' %}
  4.     {% if category_data is defined and category_data['category_name'] is defined and ct != 'allitem' %}
  5.       {% set sameCatRecommendTitle = category_data['category_name'] ~ 'のおすすめ商品はこちら' %}
  6.     {% elseif category_data is defined and category_data['main_category_name'] is defined %}
  7.       {% set sameCatRecommendTitle = category_data['main_category_name'] ~ 'のおすすめ商品はこちら' %}
  8.     {% elseif mc is defined and breadCrumb is defined and breadCrumb[1] is defined and breadCrumb[0] != '' %}
  9.       {% set sameCatRecommendTitle = breadCrumb[0]['label'] ~ 'のおすすめ商品はこちら' %}
  10.     {% endif %}
  11.     <h2>{{ sameCatRecommendTitle | display_text }}</h2>
  12.     <ul style="padding-top: 15px; display: flex; justify-content: center; overflow: hidden; padding-bottom: 10px;flex-wrap: wrap;">
  13.       {% for _popu in popularData %}
  14.         {% set item_id = _popu['goods_id'] %}
  15.         {% if _popu['goods_canonical_hinban'] is defined %}
  16.           {% set item_id = _popu['goods_canonical_hinban'] %}
  17.         {% endif %}
  18.         {% set _mainUrlSumImg = makeImageURL("goods.img", _popu['goods_id']) %}
  19.         {% set item_url_surfix = '' %}
  20.         {% if mcId is defined and mcId != '' and mcName is defined and mcName != '' %}
  21.           {% set item_url_surfix = 'mcName=' ~ mcName ~ '&mc=' ~ mcId %}
  22.         {% endif %}
  23.         {% if item_url_surfix != '' and ctId is defined and ctId != '' and ctName is defined and ctName != '' %}
  24.           {% set item_url_surfix = item_url_surfix ~ '&ctName==' ~ ctName ~ '&ct=' ~ ctId %}
  25.         {% endif %}
  26.         <li style="width: 100px; float: left; margin: 8px; font-size: 10px; line-height: 1.5em;">
  27.           <a href="/item/{{ item_id }}.html{% if item_url_surfix != '' %} {{ '?' ~ item_url_surfix }} {% endif %}">
  28.           <img style="border: 1px solid #ccc;" src="{{ _mainUrlSumImg | display_text }}" alt="img">
  29.           <div >{{ _popu['goods_name'] | display_text }}</div>
  30.           </a>
  31.         </li>
  32.       {% endfor %}
  33.     </ul>
  34.   {% endif %}
  35. <!-- /売れ筋 -->