{#
ランキング
#}
{# 親カテゴリの判定|default_frameで設定 #}
{% if category_base == '7' %}{# YAMASHITA #}
{%
set rankData = {
item: [ 59, 46, 23, 33, 34, 44, 22, 21, ],
url: '/products/list?category_id=7'
}
%}
{% elseif category_base == '8' %}{# Maria #}
{%
set rankData = {
item: [ 114, 41, 58, 17, 42, ],
url: '/products/list?category_id=8'
}
%}
{% else %}{# 総合 #}
{%
set rankData = {
item: [ 59, 60, 13, 40, 23, 33, 50, 45, 24, 19 ],
url: '/products/list'
}
%}
{% endif %}
<!-- ランキング -->
<div class="ec-shelfRole ym-rankingRole ym-role">
<div class="ec-secHeading">
<span class="ec-secHeading__en">RANKING</span>
<span class="ec-secHeading__line"></span>
<span class="ec-secHeading__ja">最新人気商品ランキング</span>
</div>
<ol class="ym-rankingRole__list ym-item__list">
{% for key, productId in rankData.item %}
{% set Product = repository('Eccube\\Entity\\Product').find(productId) %}
<li class="ym-rankingRole__item ym-item">
<a href="{{ url('product_detail', {'id': Product.id}) }}">
<p class="ym-item__image">
<img src="{{ asset(Product.main_list_image|no_image_product, 'save_image') }}" alt="">
</p>
<p class="ym-item__name">{{ Product.name }}</p>
<p class="ym-item__price">
{% if Product.hasProductClass %}
{% if Product.getPrice02Min == Product.getPrice02Max %}
{{ Product.getPrice02IncTaxMin|price|replace({ '¥': '¥' }) }}
{% else %}
{{ Product.getPrice02IncTaxMin|price|replace({ '¥': '¥' }) }}~{{ Product.getPrice02IncTaxMax|price|replace({ '¥': '¥' }) }}
{% endif %}
{% else %}
{{ Product.getPrice02IncTaxMin|price|replace({ '¥': '¥' }) }}
{% endif %}
</p>
</a>
</li>
{% endfor %}
{#
<li class="ym-rankingRole__item ym-item">
<a href="">
<p class="ym-item__image">
<img src="/html/user_data/assets/img/dummy/img_dummy_01.jpg">
</p>
<p class="ym-item__name">エギ王エギングバッグ</p>
<p class="ym-item__price">¥4,400(税込)</p>
</a>
</li>
<li class="ym-rankingRole__item ym-item">
<a href="">
<p class="ym-item__image">
<img src="/html/user_data/assets/img/dummy/img_dummy_02.jpg">
</p>
<p class="ym-item__name">エギ王カスタムハンドル</p>
<p class="ym-item__price">¥27,500(税込)</p>
</a>
</li>
<li class="ym-rankingRole__item ym-item">
<a href="">
<p class="ym-item__image">
<img src="/html/user_data/assets/img/dummy/img_dummy_03.jpg">
</p>
<p class="ym-item__name">YAMASHITAカッティングステッカー</p>
<p class="ym-item__price">¥1,650(税込)</p>
</a>
</li>
<li class="ym-rankingRole__item ym-item">
<a href="">
<p class="ym-item__image">
<img src="/html/user_data/assets/img/dummy/img_dummy_04.jpg">
</p>
<p class="ym-item__name">エギ王Tシャツ</p>
<p class="ym-item__price">¥3,300(税込)</p>
</a>
</li>
<li class="ym-rankingRole__item ym-item">
<a href="">
<p class="ym-item__image">
<img src="/html/user_data/assets/img/dummy/img_dummy_05.jpg">
</p>
<p class="ym-item__name">エギ王 ライフジャケット 肩掛</p>
<p class="ym-item__price">¥2,4200(税込)</p>
</a>
</li>
<li class="ym-rankingRole__item ym-item">
<a href="">
<p class="ym-item__image">
<img src="/html/user_data/assets/img/dummy/img_dummy_06.jpg">
</p>
<p class="ym-item__name">YAMASHITA キャップ</p>
<p class="ym-item__price">¥3,300(税込)</p>
</a>
</li>
#}
</ol>
<p class="ym-more ym-btn"><a href="{{ rankData.url }}">もっと見る</a></p>
</div>