{% set displayCnt = 0 %}
{% set breakCountForRankLabel = 1 %}
{% set an_v = detailData.an_v %}
{% set session = session_data() %}
{% set ranking_num = max_display_cnt %}
{% set order_type = get_category_order_type() %}
<style>
#glist .gtest {
position: relative;
bottom: 0;
width: 100%;
}
</style>
<!-- glist -->
<div
id="glist"
{% if useCache is defined and useCache %} class="fbt-lazy" {% endif %}
summary="商品リスト"
data-list-name="{% if isMainCategory %}親カテゴリ {% else %} 子カテゴリ {% endif %} / 商品DB"
data-page="{{ detailData.pager_pages_current_num }}"
data-count-per-page="{% if session is defined and session.display_max is defined %}{{ session.display_max }}{% else %}10{% endif %}"
>
<ul>
{% for item in detailData.item %}
{% if loop.index <= detailData.max_cnt %}
{% set displayCnt = displayCnt + 1 %}
{% if displayCnt % col_count == 1 %}
{% if displayCnt > 1 %}
</ul>
<ul>
{% set breakCountForRankLabel = 1 %}
{% endif %}
{% endif %}
{#{% set item_data = detailData.item[an_v[loop.index - 1]] %}#}
{% set item_data = detailData.item[loop.index - 1] %}
{% set item_idx = loop.index %}
<!-- item-list-item.phtml -->
{% set no = 0 %}
{% if app.request.query.get('no') is defined %}
{% set no = app.request.query.get('no') %}
{% endif %}
<li
class="category-list-item product-box"
data-goods-id="{{ item_data.goods_id | display_text }}"
data-id="{{ item_data.kataban | display_text }}"
data-name="{{ item_data.goods_name | display_text }}"
{% if isMainCategory %}
data-category="{{ data.main_category_name ?? '' }}"
{% else %}
data-category="{% if mainCategoryData is defined and mainCategoryData.main_category_name is defined %}{{ mainCategoryData.main_category_name | display_text }}{% endif %} / {% if data.category_name is defined %} {{ category_name }} {% endif %}"
{% endif %}
data-price="{{ php_preg_replace('@<.*>@', '', item_data.price) }}"
>
<a href="{{ lm_detailLink2(item_data, canonical_category_name, '', useItemUrlDuplicated) }}">
<div id="c{{ item_idx }}" class="gcont product-link" onclick="location.href='{{ lm_detailLink2(item_data, canonical_category_name, '', useItemUrlDuplicated) }}'">
{% if order_type is null or order_type != 6 %}
{% if no + item_idx <= ranking_num %}
{% if item_idx <= 3 %}
<div class="rank rank-top3"><span class="rank-label">人気ランキング 第{{ item_idx }}位</span></div>
{% else %}
<div class="rank"><span class="rank-label"><span class="rank-num">{{ item_idx }}</span>位</span></div>
{% endif %}
{% set breakCountForRankLabel = breakCountForRankLabel + 1 %}
{% else %}
{% if breakCountForRankLabel != 1 %}
<div class="rank rank-blank"></div>
{% set breakCountForRankLabel = breakCountForRankLabel + 1 %}
{% endif %}
{% endif %}
{% endif %}
<!-- メイン画像 -->
<div class="clearfix">
<div class="gcont1">
<div class="photo">
{% set _mainUrlSumImg = makeImageURL("goods.img", item_data.goods_id) %}
<img src="{{ _mainUrlSumImg | display_text }}" alt="{{ item_data.goods_name }}" border="0">
</div>
</div>
</div>
<!-- メイン画像 -->
{{ render_product_item(item_data, useCache, average, col_count, vendingStatusMap) | raw }}
</div>
</a>
</li>
<!-- item-list-item.phtml -->
{% endif %}
{% endfor %}
{% if displayCnt > 0 and (displayCnt % col_count > 0) %}
{% for i in 0..(col_count - displayCnt % col_count - 1) %}
<p> </p>
{% endfor %}
</ul>
{% endif %}
</div>
<!-- /glist -->
{% if pager_data is defined and (pager_data.pager is defined and (pager_data.pager | length) > 1) %}
<div class="item-list-pagination">
<ul>
{% if pager_data.prev_link is defined and pager_data.prev_link %}
<li class="item-list-pagination-page item-list-pagination-prev-next item-list-pagination-prev"><a href="{{ pager_data.prev_link }}">前へ</a></li>
{% endif %}
{% for page in pager_data.pager %}
{% if page.is_current is defined and page.is_current %}
<li class="item-list-pagination-page item-list-pagination-page-current"><span>{{ page.num }}</span></li>
{% elseif page.link is defined %}
<li class="item-list-pagination-page item-list-pagination-page-link"><a href="{{ page.link }}">{{ page.num }}</a></li>
{% else %}
<li class="item-list-pagination-page {{ page.is_ellipses is defined and page.is_ellipses ? ' item-list-pagination-ellipses' : '' }}"><span>{{ page.num }}</span></li>
{% endif %}
{% endfor %}
{% if pager_data.next_link is defined and pager_data.next_link %}
<li class="item-list-pagination-page item-list-pagination-prev-next item-list-pagination-next"><a href="{{ pager_data.next_link }}">次へ</a></li>
{% endif %}
</ul>
</div>
{% endif %}