{#
* This file is part of the Recommend Product plugin
*
* Copyright (C) EC-CUBE CO.,LTD. All Rights Reserved.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
#}
{% set recommend_products = repository('Plugin\\Recommend4\\Entity\\RecommendProduct').getRecommendProduct %}
<style type="text/css">
.sale_badge_area {
font-size: 10px;
position: relative;
bottom: 5px;
left: 5px;
}
.sale_badge_area ul {
margin: 0;
padding: 0;
position: absolute;
font-size: 10px;
bottom: 0;
}
.sale_badge_area ul li {
list-style: none;
padding: 5px 10px;
background-color: #fd565f;
color: #FFF;
z-index: 1;
}
@media screen and (max-width:768px) {
.sale_badge_area ul li {
padding: 2px 5px;
}
}
</style>
<!-- ▼item_list▼ -->
<div class="ec-shelfRole custom_ru_pro">
<div class="page-width">
<div class="section-header section-header--with-link">
<div class="section-header__title">
<h2 class="section-header__titleText">RECOMMEND</h2>
<p>おすすめ商品</p>
</div>
{#
<a href="/RecommendProduct" class="section-header__link">一覧を見る</a>
#}
</div>
<ul class="ec-shelfGrid page-width">
{% for RecommendProduct in recommend_products %}
<li class="ec-shelfGrid__item">
<a href="{{ url('product_detail', {'id': RecommendProduct.Product.id}) }}">
<img src="{{ asset(RecommendProduct.Product.mainFileName|no_image_product, "save_image") }}">
{% if RecommendProduct.Product.getPrice01IncTaxMin %}
<div class="sale_badge_area">
<ul>
<li class="sale_badge">
{{ RecommendProduct.Product|sales_off }}
</li>
</ul>
</div>
{% endif %}
<p>{{ RecommendProduct.comment|raw|nl2br }}</p>
<dl>
<dt class="item_name">{{ RecommendProduct.Product.name }}</dt>
<dd class="item_price">
{% if RecommendProduct.Product.hasProductClass %}
{% if RecommendProduct.Product.getPrice02Min == RecommendProduct.Product.getPrice02Max %}
{{ RecommendProduct.Product.getPrice02IncTaxMin|price }}
{% else %}
{{ RecommendProduct.Product.getPrice02IncTaxMin|price }} ~ {{ RecommendProduct.Product.getPrice02IncTaxMax|price }}
{% endif %}
{% else %}
{{ RecommendProduct.Product.getPrice02IncTaxMin|price }}
{% endif %}
</dd>
</dl>
</a>
</li>
{% endfor %}
</ul>
</div>
</div>
<!-- ▲item_list▲ -->