{% if Category81 %}
<div class="ec-role">
<!-- ▼item_list▼ -->
<div class="item_gallery flyer">
<h2><span>{{ Category81.name }}</span><a href="{{ url('product_list') }}?category_id={{ Category81.id }}&orderby=2">もっと見る</a></h2>
<ul class="row">
{% for Product in productsCategory81 %}
<li>
<a href="{{ url('product_detail', {'id': Product.id}) }}" class="item_photo">
<div class="item_photo overflow-hidden">
{# <img src="{{ app.config.image_save_urlpath }}/{{ Product.main_list_image|no_image_product }}"> #}
<img src="{{ asset(Product.main_list_image|no_image_product, 'save_image') }}" class="rounded-0">
{% if app.user != null %}
{% if app.user.rank.getId == 1 %}
{% if Product.MarkupRateMax and Product.MarkupRateMax > 0 %}
<span class="multi_num"><em>掛率</em>
{{ Product.MarkupRateMax|number_format(0) }}%
</span>
{% endif %}
{% else %}
{% if Product.price01Min %}
{% set discount_rate = (Product.price02Min * app.user.rank.getDiscountRate / Product.price01Min) * 100 %}
{% if Product.MarkupRateMax and Product.MarkupRateMax > 0 %}
<span class="multi_num"><em>掛率</em>
{{ discount_rate|number_format(0) }}%
</span>
{% endif %}
{% endif %}
{% endif %}
{% else %}
{% if Product.MarkupRateMax and Product.MarkupRateMax > 0 %}
<span class="multi_num"><em>掛率</em>
{{ Product.MarkupRateMax|number_format(0) }}%
</span>
{% endif %}
{% endif %}
{# 掛率は入力値をそのまま使う
{% if Product.price01Min != 0 %}
{% set discount_rate = (Product.price02Min / Product.price01Min) * 100 %}
{% if discount_rate < 100 %}
<span class="multi_num"><em>掛率</em> {{ discount_rate|number_format(0) }}% </span>
{% endif %}
{% endif %}
#}
</div>
</a>
<dl>
{% for ProductTag in Product.ProductTag %}
<dd class="product_tag_list"><a href="{{ url('product_list') }}?tag_id={{ ProductTag.TagId}}">{{ ProductTag.Tag }}</a></dd>
{% endfor %}
<dt class="product_maker_image">
{% if Product.Maker is not null %}
{% set image_path = 'assets/img/maker/' ~ Product.Maker.maker_id ~ '.png' %}
{% else %}
{% set image_path = 'assets/img/maker/default.png' %}
{% endif %}
<img src="{{ asset(image_path, 'user_data') }}" onerror="this.onerror=null;this.style='display:none;'" alt="メーカーロゴ">
</dt>
<dt class="item_name"><a href="{{ url('product_detail', {'id': Product.id}) }}">{{ Product.name }}</a></dt>
<dd class="item_price special_price">
{% if app.user != null %}
{% set price02min = Product.getPrice02Min * app.user.rank.getDiscountRate %}
{% else %}
{% set price02min = Product.getPrice02Min %}
{% endif %}
{{ price02min|price }}
</dd>
</dl>
</li>
{% endfor %}
</ul>
</div>
<!-- ▲item_list▲ -->
</div>
{% endif %}