{#
* This file is part of the Recommend Product plugin
*
* Copyright (C) 2016 LOCKON 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 %}
{% if recommend_products is not empty %}
<style type="text/css">
.slide-wrap {
margin-bottom: 20px;
overflow-y: hidden;
overflow-x: scroll;
display: flex;
-webkit-overflow-scrolling: touch;
overflow-scrolling: touch;
}
@media only screen and (max-width: 767px) {
.side-box {
flex: 0 0 40%;
padding: 0 8px;
}
}
@media only screen and (min-width: 768px) {
.side-box {
flex: 0 0 18%;
padding: 0 8px;
}
}
.inner, .inner img {
max-width: 100%;
}
</style>
<!-- ▼item_list▼ -->
<div class="ec-shelfRole product-list">
<h3 class="title-bottom-line mt-3">あなたにおすすめの商品</h3>
<div class="slide-wrap">
{% for RecommendProduct in recommend_products %}
<div class="side-box">
<div class="inner">
<a href="{{ url('product_detail', {'id': RecommendProduct.Product.id}) }}">
<img src="{{ asset(RecommendProduct.Product.mainFileName|no_image_product, "save_image") }}" loading="lazy">
{# <p>{{ RecommendProduct.comment|raw|nl2br }}</p> #}
<p>{{ RecommendProduct.Product.name }}</p>
<p class="price02_default">
{% 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 %}
</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>
</div>
</div>
{% endfor %}
</div>
</div>
<!-- ▲item_list▲ -->
{% endif %}