{% if productHistory|length > 0 %}
<section class="products-subSection">
<h3 class="mod-hl-02">
<span class="isJp">最近チェックした商品</span>
</h3>
<div class="mod-products-list">
{% for Checkitem in productHistory %}
{% set CheckitemProduct = repository('Eccube\\Entity\\Product').find(Checkitem.id) %}
<article class="productsBox">
<a href="{{ url('product_detail', {'id': CheckitemProduct.id}) }}" class="productsBoxInner">
<span class="productsBox-img">
<span class="imgInner">
<img src="{{ asset(CheckitemProduct.main_list_image|no_image_product, 'save_image') }}" alt="" class="imgObjectFitCover">
{% if not CheckitemProduct.stock_find %}
<div class="is-soldout">
<span>SOLD OUT</span>
</div>
{% endif %}
</span>
</span>
<h4 class="productsBox-hl">{{Checkitem.name}}</h4>
<p class="productsBox-text">
{% if Checkitem.hasProductClass %}
{% if Checkitem.getPrice02Min == Checkitem.getPrice02Max %}
{{ Checkitem.getPrice02IncTaxMin|number_format }}
{% else %}
{{ Checkitem.getPrice02IncTaxMin|number_format }}
~
{{ Checkitem.getPrice02IncTaxMax|number_format }}
{% endif %}
{% else %}
{{ Checkitem.getPrice02IncTaxMin|number_format }}
{% endif %}
円<small class="isSmall">税込</small>
</p>
</a>
</article>
{% endfor %}
</div>
</section>
<style>
.is-soldout{
background-color: rgba(0, 0, 0, 0.5);
text-align: center;
position: absolute;
color: #fff;
font-size: 1.4rem;
margin: 0 !important;
padding: 0 !important;
width: 100%;
height: 100%;
}
.is-soldout span{
position: relative;
display: block;
height: 100%;
top: 40%;
}
@media only screen and (min-width: 600px)and (max-width: 1023px){
.is-soldout{
font-size: 1.3rem;
}
}
</style>
{% endif %}