<!-- 売れ筋 -->
{% if popularData|length >= 1 %}
{% set sameCatRecommendTitle = 'おすすめ商品はこちら' %}
{% if category_data is defined and category_data['category_name'] is defined and ct != 'allitem' %}
{% set sameCatRecommendTitle = category_data['category_name'] ~ 'のおすすめ商品はこちら' %}
{% elseif category_data is defined and category_data['main_category_name'] is defined %}
{% set sameCatRecommendTitle = category_data['main_category_name'] ~ 'のおすすめ商品はこちら' %}
{% elseif mc is defined and breadCrumb is defined and breadCrumb[1] is defined and breadCrumb[0] != '' %}
{% set sameCatRecommendTitle = breadCrumb[0]['label'] ~ 'のおすすめ商品はこちら' %}
{% endif %}
<h2>{{ sameCatRecommendTitle | display_text }}</h2>
<ul style="padding-top: 15px; display: flex; justify-content: center; overflow: hidden; padding-bottom: 10px;flex-wrap: wrap;">
{% for _popu in popularData %}
{% set item_id = _popu['goods_id'] %}
{% if _popu['goods_canonical_hinban'] is defined %}
{% set item_id = _popu['goods_canonical_hinban'] %}
{% endif %}
{% set _mainUrlSumImg = makeImageURL("goods.img", _popu['goods_id']) %}
{% set item_url_surfix = '' %}
{% if mcId is defined and mcId != '' and mcName is defined and mcName != '' %}
{% set item_url_surfix = 'mcName=' ~ mcName ~ '&mc=' ~ mcId %}
{% endif %}
{% if item_url_surfix != '' and ctId is defined and ctId != '' and ctName is defined and ctName != '' %}
{% set item_url_surfix = item_url_surfix ~ '&ctName==' ~ ctName ~ '&ct=' ~ ctId %}
{% endif %}
<li style="width: 100px; float: left; margin: 8px; font-size: 10px; line-height: 1.5em;">
<a href="/item/{{ item_id }}.html{% if item_url_surfix != '' %} {{ '?' ~ item_url_surfix }} {% endif %}">
<img style="border: 1px solid #ccc;" src="{{ _mainUrlSumImg | display_text }}" alt="img">
<div >{{ _popu['goods_name'] | display_text }}</div>
</a>
</li>
{% endfor %}
</ul>
{% endif %}
<!-- /売れ筋 -->