{#
This file is part of EC-CUBE
Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
http://www.ec-cube.co.jp/
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
#}
{% extends 'default_frame.twig' %}
{% set body_class = 'product_page' %}
{% block stylesheet %}
<style>
.slick-slider {
margin-bottom: 30px;
}
.slick-dots {
position: absolute;
bottom: -45px;
display: block;
width: 100%;
padding: 0;
list-style: none;
text-align: center;
}
.slick-dots li {
position: relative;
display: inline-block;
width: 20px;
height: 20px;
margin: 0 5px;
padding: 0;
cursor: pointer;
}
.slick-dots li button {
font-size: 0;
line-height: 0;
display: block;
width: 20px;
height: 20px;
padding: 5px;
cursor: pointer;
color: transparent;
border: 0;
outline: none;
background: transparent;
}
.slick-dots li button:hover,
.slick-dots li button:focus {
outline: none;
}
.slick-dots li button:hover:before,
.slick-dots li button:focus:before {
opacity: 1;
}
.slick-dots li button:before {
content: " ";
line-height: 20px;
position: absolute;
top: 0;
left: 0;
width: 12px;
height: 12px;
text-align: center;
opacity: .25;
background-color: black;
border-radius: 50%;
}
.slick-dots li.slick-active button:before {
opacity: .75;
background-color: black;
}
.slick-dots li button.thumbnail img {
width: 0;
height: 0;
}
</style>
{% endblock %}
{% block javascript %}
<script>
eccube.classCategories = {{ class_categories_as_json(Product)|raw }};
// 規格2に選択肢を割り当てる。
function fnSetClassCategories(form, classcat_id2_selected) {
var $form = $(form);
var product_id = $form.find('input[name=product_id]').val();
var $sele1 = $form.find('select[name=classcategory_id1]');
var $sele2 = $form.find('select[name=classcategory_id2]');
eccube.setClassCategories($form, product_id, $sele1, $sele2, classcat_id2_selected);
}
{% if form.classcategory_id2 is defined %}
fnSetClassCategories(
$('#form1'), {{ form.classcategory_id2.vars.value|json_encode|raw }}
);
{% elseif form.classcategory_id1 is defined %}
eccube.checkStock($('#form1'), {{ Product.id }}, {{ form.classcategory_id1.vars.value|json_encode|raw }}, null);
{% endif %}
</script>
<script>
$(function() {
// bfcache無効化
$(window).bind('pageshow', function(event) {
if (event.originalEvent.persisted) {
location.reload(true);
}
});
// Core Web Vital の Cumulative Layout Shift(CLS)対策のため
// img タグに width, height が付与されている.
// 630px 未満の画面サイズでは縦横比が壊れるための対策
// see https://github.com/EC-CUBE/ec-cube/pull/5023
$('.ec-grid2__cell').hide();
var removeSize = function () {
$('.slide-item').height('');
$('.slide-item img')
.removeAttr('width')
.removeAttr('height')
.removeAttr('style');
};
var slickInitial = function(slick) {
$('.ec-grid2__cell').fadeIn(1500);
var baseHeight = $(slick.target).height();
var baseWidth = $(slick.target).width();
var rate = baseWidth / baseHeight;
$('.slide-item').height(baseHeight * rate); // 余白を削除する
// transform を使用することでCLSの影響を受けないようにする
$('.slide-item img')
.css(
{
'transform-origin': 'top left',
'transform': 'scaleY(' + rate + ')',
'transition': 'transform .1s'
}
);
// 正しいサイズに近くなったら属性を解除する
setTimeout(removeSize, 500);
};
$('.item_visual').on('init', slickInitial);
// リサイズ時は CLS の影響を受けないため属性を解除する
$(window).resize(removeSize);
$('.item_visual').slick({
dots: false,
arrows: false,
responsive: [{
breakpoint: 768,
settings: {
adaptiveHeight: true,
dots: true,
arrows: true,
prevArrow: `<button type="button" class="slick-prev tes"><img src="{{ asset('assets/icon/prev.png') }}" alt="pre"></button>`,
nextArrow: `<button type="button" class="slick-next tess"><img src="{{ asset('assets/icon/next.png') }}" alt="next"></button>`,
}
}]
});
$('.slideThumb').on('click', function() {
var index = $(this).attr('data-index');
$('.item_visual').slick('slickGoTo', index, false);
})
});
</script>
<script>
$(function() {
$('.add-cart').on('click', function(event) {
{% if form.classcategory_id1 is defined %}
// 規格1フォームの必須チェック
if ($('#classcategory_id1').val() == '__unselected' || $('#classcategory_id1').val() == '') {
$('#classcategory_id1')[0].setCustomValidity('{{ '項目が選択されていません'|trans }}');
return true;
} else {
$('#classcategory_id1')[0].setCustomValidity('');
}
{% endif %}
{% if form.classcategory_id2 is defined %}
// 規格2フォームの必須チェック
if ($('#classcategory_id2').val() == '__unselected' || $('#classcategory_id2').val() == '') {
$('#classcategory_id2')[0].setCustomValidity('{{ '項目が選択されていません'|trans }}');
return true;
} else {
$('#classcategory_id2')[0].setCustomValidity('');
}
{% endif %}
// 個数フォームのチェック
if ($('#quantity').val() < 1) {
$('#quantity')[0].setCustomValidity('{{ '1以上で入力してください。'|trans }}');
return true;
} else {
$('#quantity')[0].setCustomValidity('');
}
event.preventDefault();
$form = $('#form1');
$.ajax({
url: $form.attr('action'),
type: $form.attr('method'),
data: $form.serialize(),
dataType: 'json',
beforeSend: function(xhr, settings) {
// Buttonを無効にする
$('.add-cart').prop('disabled', true);
}
}).done(function(data) {
// レスポンス内のメッセージをalertで表示
$.each(data.messages, function() {
$('#ec-modal-header').text(this);
});
$('.ec-modal').show()
// カートブロックを更新する
$.ajax({
url: "{{ url('block_cart') }}",
type: 'GET',
dataType: 'html'
}).done(function(html) {
$('.ec-headerRole__cart').html(html);
});
}).fail(function(data) {
alert('{{ 'カートへの追加に失敗しました。'|trans }}');
}).always(function(data) {
// Buttonを有効にする
$('.add-cart').prop('disabled', false);
});
});
});
$('.ec-modal-wrap').on('click', function(e) {
// モーダル内の処理は外側にバブリングさせない
e.stopPropagation();
});
$('.ec-modal-overlay, .ec-modal, .ec-modal-close, .ec-inlineBtn--cancel').on('click', function() {
$('.ec-modal').hide()
});
$('.show_modal').on('click', function() {
const scrollTop = $(window).scrollTop() + 12;
const imgSrc = $(this).find('.image').attr('src');
$('.ec-modal-box-image img').attr('src', imgSrc);
$('.ec-modal-box-image').css('top', scrollTop + 'px').show();
$('.ec-modal-box-image-overlay').show();
});
$('.show_modal__sub_image').on('click', function() {
const scrollTop = $(window).scrollTop() + 12;
const newSrc = $(this).data('src');
$('.ec-modal-box-image img').attr('src', newSrc);
$('.ec-modal-box-image').css('top', scrollTop + 'px').show();
$('.ec-modal-box-image-overlay').show();
});
$('.icon-close').on('click', function(){
$('.ec-modal-box-image').hide();
$('.ec-modal-box-image-overlay').hide();
});
$('.ec-modal-box-image-overlay').on('click', function(){
$('.ec-modal-box-image').hide();
$(this).hide();
});
const urlToShare = encodeURIComponent(window.location.href);
$('.mixi').on("click", function (event) {
event.preventDefault();
const mixiURL = `https://mixi.jp/share.pl?u=${urlToShare}`;
window.open(mixiURL, "mixiShareWindow", "width=600, height=400, scrollbars=yes, resizable=yes");
});
$('.twitter').on("click", function (event) {
event.preventDefault();
let productName = $('#product-name').data('value');
const twitterURL = `https://twitter.com/intent/tweet?text=${productName}`;
window.open(twitterURL, "twitterShareWindow", "width=600, height=400, scrollbars=yes, resizable=yes");
});
$('.btn-action').on("click", function() {
$(this).closest('.main-item').find('.item__active').slideToggle()
if ($(this).attr("src").includes("btn_minus.png")) {
$(this).attr("src", "{{ asset('assets/img/common/btn_plus.png') }}");
} else {
$(this).attr("src", "{{ asset('assets/img/common/btn_minus.png') }}");
}
});
</script>
<script type="application/ld+json">
{
"@context": "https://schema.org/",
"@type": "Product",
"name": "{{ BaseInfo.shop_name ~ ' / ' ~ Product.papc3 ~ Product.name ~ Product.papc4 }}",
"image": [
{% for img in Product.ProductImage %}
"{{ app.request.schemeAndHttpHost }}{{ asset(img, 'save_image') }}"{% if not loop.last %},{% endif %}
{% else %}
"{{ app.request.schemeAndHttpHost }}{{ asset(''|no_image_product, 'save_image') }}"
{% endfor %}
],
"description": "{{ Product.description_list | default(Product.description_detail) | replace({'\n': '', '\r': ''}) | slice(0,300) }}",
{% if Product.code_min %}
"sku": "{{ Product.code_min }}",
{% endif %}
"offers": {
"@type": "Offer",
"url": "{{ url('product_detail', {'id': Product.id}) }}",
"priceCurrency": "{{ eccube_config.currency }}",
"price": {{ Product.getPrice02IncTaxMin ? Product.getPrice02IncTaxMin : 0}},
"availability": "{{ Product.stock_find ? "InStock" : "OutOfStock" }}"
}
}
</script>
{% endblock %}
{% set GroupRelatedProduct = get_group_parent_product_by_id(Product.id) %}
{% block main %}
<div class="ec-productRole custom-productDetail">
{# breadcumb #}
{% if Product.ProductCategories is not empty %}
{% for ProductCategory in Product.ProductCategories %}
{% if Product.ProductCategories|length == 1 or ProductCategory.Category.path|length >= 2 %}
<div class="ec-breadcrumb">
<a href="{{ url('homepage') }}">Home</a>
<span> ></span>
{% for Category in ProductCategory.Category.path %}
{% if Category.id == 1 %}
<a href="/rock/">{{ Category.name }}</a>
{% else %}
<a href="{{ url('product_list') }}?category_id={{ Category.id }}">{{ Category.name }}</a>
{% endif %}
{%- if loop.last == false %}
<span> ></span>
{% endif -%}
{% endfor %}
{% if GroupRelatedProduct %}
{% set GroupProduct = GroupRelatedProduct.Product %}
<span> ></span> <a href="{{ url('product_list') }}?group_id={{ GroupProduct.id }}">{{ GroupProduct.name }}</a>
{% endif %}
</div>
{% endif %}
{% endfor %}
{% else %}
<div class="ec-breadcrumb">
<a href="{{ url('homepage') }}">Home</a>
</div>
{% endif %}
{# end breadcumb #}
<div class="guide_title bold" id="product-name" data-value="{{ Product.papc3 }} {{ Product.name }}{{ Product.papc4 }} {{ Product.code_min }}{% if Product.code_min != Product.code_max %} ~ {{ Product.code_max }}{% endif %}">
{{ Product.papc3 }} {{ Product.getFirstArtist().name ?? '' }}{% if Product.getFirstArtist() is not null %}/{% endif %}{{ Product.name }}{{ Product.papc4 }}
</div>
{% if Product.papc12 %}
<div class="center mB20 banner">
<img src="{{ Product.papc12 }}" alt="{{ Product.papc13 }}" class="maxw950" />
</div>
{% endif %}
<div class="pro-details_area1">
{{ Product.description_list|raw }}
</div>
<div class="pro-details_line"></div>
<div class="ec-grid2">
<div class="ec-grid2__cell">
<div class="ec-sliderItemRole">
<div class="list-image">
{% for i in 1..10 %}
{% set image = attribute(Product, 'sub_image' ~ i) %}
{% set largeImage = attribute(Product, 'sub_large_image' ~ i) %}
{% if image %}
<div class="image__item show_modal__sub_image" data-src="{{ asset(largeImage ?: image, 'save_image') }}">
<img class="image" src="{{ asset(image, 'save_image') }}" alt="Image Item" loading="lazy">
</div>
{% endif %}
{% endfor %}
</div>
<div class="item_visual slide-mobile">
{% for ProductImage in Product.ProductImage %}
<div class="slide-item show_modal">
<img src="{{ asset('assets/img/common/btn_item_detail.png') }}" class="icon-detail" alt="Icon Detail">
<img src="{{ asset(ProductImage, 'save_image') }}" alt="{{ loop.first ? Product.name : '' }}" class="image" width="550" height="550"{% if loop.index > 1 %} loading="lazy"{% endif %}>
</div>
{% else %}
<div class="slide-item show_modal">
<img src="{{ asset('assets/img/common/btn_item_detail.png') }}" class="icon-detail" alt="Icon Detail">
<img src="{{ asset(''|no_image_product, 'save_image') }}" alt="{{ loop.first ? Product.name : '' }}" class="image" width="550" height="550">
</div>
{% endfor %}
{% for i in 1..10 %}
{% set image = attribute(Product, 'sub_image' ~ i) %}
{% set largeImage = attribute(Product, 'sub_large_image' ~ i) %}
{% if image %}
<div class="slide-item show_modal only-mobile">
<img src="{{ asset(largeImage ?: image, 'save_image') }}" alt="{{ Product.name }}" class="image" width="550" height="550" loading="lazy">
</div>
{% endif %}
{% endfor %}
</div>
<div class="item_visual slide-pc">
{% for ProductImage in Product.ProductImage %}
<div class="slide-item show_modal">
<img src="{{ asset('assets/img/common/btn_item_detail.png') }}" class="icon-detail" alt="Icon Detail">
<img src="{{ asset(ProductImage, 'save_image') }}" alt="{{ loop.first ? Product.name : '' }}" class="image" width="550" height="550"{% if loop.index > 1 %} loading="lazy"{% endif %}>
</div>
{% else %}
<div class="slide-item show_modal">
<img src="{{ asset('assets/img/common/btn_item_detail.png') }}" class="icon-detail" alt="Icon Detail">
<img src="{{ asset(''|no_image_product, 'save_image') }}" alt="{{ loop.first ? Product.name : '' }}" class="image" width="550" height="550">
</div>
{% endfor %}
</div>
<!-- <div class="item_nav">
{% for ProductImage in Product.ProductImage %}
<div class="slideThumb" data-index="{{ loop.index0 }}"><img src="{{ asset(ProductImage, 'save_image') }}" alt="" width="133" height="133" loading="lazy"></div>
{% endfor %}
</div> -->
</div>
</div>
<div class="ec-grid2__cell">
<div class="ec-productRole__profile">
{# アーティスト #}
{% if Product.getFirstArtist() is not null %}
<span class="artist">
<a href="{{ url('product_list') }}?artist_id={{Product.getFirstArtist().id}}">
{{Product.getFirstArtist().name}}</a>
</span>
{% endif %}
{# 商品名 #}
<div class="ec-productRole__title">
<h2 class="ec-headingTitle{% if Product.ProductStatusCusts|length <= 0 %} no-status-custs{% endif %}">{{ Product.name }}</h2>
</div>
{% set VisibleStatusItems = [] %}
{% for StatusItem in Product.ProductStatusCusts %}
{% if StatusItem.Status.id != 13 %}
{% set VisibleStatusItems = VisibleStatusItems|merge([StatusItem]) %}
{% endif %}
{% endfor %}
{% if VisibleStatusItems|length > 0 %}
<ul class="ec-productRole__status">
{% for StatusItem in VisibleStatusItems %}
<li class="ec-productRole__status__item status_{{ StatusItem.Status.id }}">
<span>
{{ StatusItem.Status.name }}
</span>
</li>
{% endfor %}
</ul>
{% endif %}
{# タグ #}
{# <ul class="ec-productRole__tags">
{% for Tag in Product.Tags %}
<li class="ec-productRole__tag tag_{{ Tag.id }}">{{ Tag }}</li>
{% endfor %}
</ul> #}
{# 商品形態 #}
{% if Product.papc14 is not empty %}
<div class="ec-productRole__jan">
{{ '商品形態'|trans }} <span class="product-jan-default">{{ Product.papc14 }}</span>
</div>
{% endif %}
{# 品番(商品コード) #}
{% if Product.code_min is not empty %}
<div class="ec-productRole__code">
{{ '品番'|trans }} <span class="product-code-default">{{ Product.code_min }}{% if Product.code_min != Product.code_max %} ~ {{ Product.code_max }}{% endif %}</span>
</div>
{% endif %}
{# JANコード #}
{% if Product.comment1 is not empty %}
<div class="ec-productRole__jan custom-ec-productRole__jan">
{{ 'JANコード'|trans }} <span class="product-jan-default">{{ Product.comment1 }}</span>
</div>
{% endif %}
{# 通常価格 #}
{% if Product.hasProductClass -%}
{% if Product.getPrice01Min is not null and Product.getPrice01IncTaxMin == Product.getPrice01IncTaxMax %}
<div class="ec-productRole__priceRegular">
<span class="ec-productRole__priceRegularPrice"><span class="ec-productRole__price__label">{{ '通常価格'|trans }}</span><span class="price01-default product-jan-default1">{{ Product.getPrice01IncTaxMin|price|replace({' ': ''}) }}</span></span>
</div>
{% elseif Product.getPrice01Min is not null and Product.getPrice01Max is not null %}
<div class="ec-productRole__priceRegular">
<span class="ec-productRole__priceRegularPrice"><span class="ec-productRole__price__label">{{ '通常価格'|trans }}</span><span class="price01-default product-jan-default1">{{ Product.getPrice01IncTaxMin|price|replace({' ': ''}) }}~ {{ Product.getPrice01IncTaxMax|price|replace({' ': ''}) }}</span></span>
</div>
{% endif %}
{% else %}
{% if Product.getPrice01Max is not null %}
<span class="ec-productRole__priceRegularPrice"><span class="ec-productRole__price__label">{{ '通常価格'|trans }}</span><span class="price01-default product-jan-default1">{{ Product.getPrice01IncTaxMin|price|replace({' ': ''}) }}</span></span>
<!-- <span class="ec-productRole__priceRegularTax">{{ '税込'|trans }}</span> -->
{% endif %}
{% endif %}
{# 販売価格 #}
{# {% if Product.ProductClasses.first().sale_type01 %}
<div class="ec-productRole__jan">
{{ '通常価格'|trans }} <span class="product-jan-default1">{{ Product.getPrice02IncTaxMin|number_format(0, '.', ',') }}円</span>
</div>
<div class="ec-productRole__price">
<div class="ec-productRole__price__label">
価格
</div>
{% if Product.hasProductClass -%}
{% if Product.getPrice02IncTaxMin == Product.getPrice02IncTaxMax %}
{% set sale_price = Product.ProductClasses.first().sale_price + 0 %}
<div class="ec-price">
<span class="ec-price__price price02-default">
<s>{{ (sale_price * 1.1) | number_format(0, '.', ',') }}円</s>
</span>
<span class="ec-price__price price02-default tax-excluded-price1">
(税抜 {{ (sale_price) | number_format(0, '.', ',') }}円)
</span>
</div>
{% else %}
{% set sale_price = Product.ProductClasses.first().sale_price + 0 %}
<div class="ec-price">
<span class="ec-price__price price02-default">
<s>{{ (sale_price * 1.1)}} ~ {{ (sale_price * 1.1) | number_format(0, '.', ',') }}円</s>
</span>
<span class="ec-price__price price02-default tax-excluded-price1">
(税抜 {{ (sale_price)}} ~ {{ (sale_price) | number_format(0, '.', ',') }}円)
</span>
</div>
{% endif %}
{% else %}
{% set sale_price = Product.ProductClasses.first().sale_price + 0 %}
<div class="ec-price">
<span class="ec-price__price">{{ (sale_price * 1.1) | number_format(0, '.', ',') }}円</span>
<span class="ec-price__price tax-excluded-price1">(税抜 {{ (sale_price) | number_format(0, '.', ',') }}円)</span>
</div>
{% endif %}
</div>
{% else %} #}
<div class="ec-productRole__price">
<div class="ec-productRole__price__label">
価格
</div>
{% if Product.hasProductClass -%}
{% if Product.getPrice02IncTaxMin == Product.getPrice02IncTaxMax %}
<div class="ec-price">
<span class="ec-price__price price02-default">{{ Product.getPrice02IncTaxMin | number_format(0, '.', ',') }}円</span>
<span class="ec-price__price price02-default tax-excluded-price1">(税抜 {{ Product.getPrice02Min | number_format(0, '.', ',')}}円)</span>
</div>
{% else %}
<div class="ec-price">
<span class="ec-price__price price02-default">{{ Product.getPrice02IncTaxMin | number_format(0, '.', ',') }} ~ {{ Product.getPrice02IncTaxMax | number_format(0, '.', ',') }}円</span>
<span class="ec-price__price price02-default tax-excluded-price1">(税抜 {{ Product.getPrice02Min | number_format(0, '.', ',')}} ~ {{ Product.getPrice02Max | number_format(0, '.', ',')}}円)</span>
</div>
{% endif %}
{% else %}
<div class="ec-price">
<span class="ec-price__price">{{ Product.getPrice02IncTaxMin | number_format(0, '.', ',')}}円</span>
<span class="ec-price__price tax-excluded-price1">(税抜 {{ Product.getPrice02Min | number_format(0, '.', ',')}}円)</span>
</div>
{% endif %}
</div>
{# {% endif %} #}
{# 関連カテゴリ #}
{# {% if Product.ProductCategories is not empty %}
<div class="ec-productRole__category">
<div>{{ '関連カテゴリ'|trans }}</div>
{% for ProductCategory in Product.ProductCategories %}
<ul>
<li>
{% for Category in ProductCategory.Category.path %}
<a href="{{ url('product_list') }}?category_id={{ Category.id }}">{{ Category.name }}</a> {%- if loop.last == false %}
<span>></span>{% endif -%}
{% endfor %}
</li>
</ul>
{% endfor %}
</div>
{% endif %} #}
<form action="{{ url('product_add_cart', {id:Product.id}) }}" method="post" id="form1" name="form1">
{% if Product.stock_find %}
<div class="ec-productRole__actions">
{% if form.classcategory_id1 is defined %}
<div class="ec-select">
{{ form_row(form.classcategory_id1) }}
{{ form_errors(form.classcategory_id1) }}
</div>
{% if form.classcategory_id2 is defined %}
<div class="ec-select">
{{ form_row(form.classcategory_id2) }}
{{ form_errors(form.classcategory_id2) }}
</div>
{% endif %}
{% endif %}
<div class="ec-numberInput"><span>{{ '数量'|trans }}</span>
{{ form_widget(form.quantity) }}
{{ form_errors(form.quantity) }}
</div>
</div>
<a class="guide" href="{{ url('guide_order') }}">※返品について必ずご確認ください</a>
<div class="ec-productRole__btn">
<button type="submit" class="ec-blockBtn--action add-cart">
<!-- {{ 'カートに入れる'|trans }} -->
<img class="cart-pc" src="{{ asset('assets/img/common/btn_go_cart.jpg') }}" alt="Btn Cart">
<div class="cart-mobile">
<img src="{{ asset('assets/img/common/btn--cart.png') }}" alt="Cart">
カートへ入れる
</div>
</button>
</div>
{% else %}
<a class="guide guide-sold-old" href="{{ url('guide_order') }}">※返品について必ずご確認ください</a>
<div class="ec-productRole__btn">
<button type="button" class="ec-blockBtn--action disabled-button" disabled="disabled">
<!-- {{ 'ただいま品切れ中です。'|trans }} -->
<!-- <img src="{{ asset('assets/img/common/btn_go_cart.jpg') }}" alt="Btn Cart"> -->
<span class="attention-empty">SOLD OUT</span>
<span class="attention-empty__mobile">申し訳ございませんが、只今品切れ中です。</span>
</button>
</div>
{% endif %}
{{ form_rest(form) }}
</form>
<div class="ec-modal">
<div class="ec-modal-overlay">
<div class="ec-modal-wrap">
<span class="ec-modal-close"><span class="ec-icon"><img src="{{ asset('assets/icon/cross-dark.svg') }}" alt=""/></span></span>
<div id="ec-modal-header" class="text-center">{{ 'カートに追加しました。'|trans }}</div>
<div class="ec-modal-box">
<div class="ec-role">
<span class="ec-inlineBtn--cancel">{{ 'お買い物を続ける'|trans }}</span>
<a href="{{ url('cart') }}" class="ec-inlineBtn--action">{{ 'カートへ進む'|trans }}</a>
</div>
</div>
</div>
</div>
</div>
<!-- {% if BaseInfo.option_favorite_product %}
<form action="{{ url('product_add_favorite', {id:Product.id}) }}" method="post">
<div class="ec-productRole__btn">
{% if is_favorite == false %}
<button type="submit" id="favorite" class="ec-blockBtn--cancel">
{{ 'お気に入りに追加'|trans }}
</button>
{% else %}
<button type="submit" id="favorite" class="ec-blockBtn--cancel"
disabled="disabled">{{ 'お気に入りに追加済です。'|trans }}
</button>
{% endif %}
</div>
</form>
{% endif %} -->
<div class="share_social">
<div class="twitter">
<img src="{{ asset('assets/img/common/twitter-b.png') }}" alt="Icon Twitter">
</div>
<div class="facebook">
<img src="{{ asset('assets/img/common/like.png') }}" alt="Icon Twitter">
<span>いいね!0</span>
</div>
<div class="mixi">
<img src="{{ asset('assets/img/common/icon-mixi.png') }}" alt="Icon Twitter">
</div>
</div>
</div>
</div>
</div>
{# 別形態 #}
{% set GroupProductData = get_relared_product_by_id(Product.id) %}
{% if GroupProductData is not empty or Product.getFirstArtist() is not null %}
<div class="samegroup">
{% if GroupProductData is not empty and GroupProductData['arrRecommendData']|length > 0 %}
<div class="left-content">
<div class="thumb">
<img src="{{ asset(GroupProductData['group_main_list_image'], 'save_image') }}" class="image">
</div>
<div class="sametext">
<p class="title__name">『{{ Product.name|e }}』別形態</p>
<ul class="list-data">
{% for productItem in GroupProductData['arrRecommendData'] %}
<li>
<a href="{{ url('product_detail', {id: productItem.id}) }}">
{{ productItem.papc14 ? productItem.papc14|e : productItem.name }}
</a>
</li>
{% endfor %}
</ul>
</div>
</div>
{% endif %}
{# 作品一覧 #}
{% if Product.getFirstArtist() is not null %}
<a class="right-content" href="{{ url('product_list') }}?artist_id={{Product.getFirstArtist().id}}">
<div class="clickartist2"><b>{{Product.getFirstArtist().name}}</b> <span><br>作品一覧</span></div>
</a>
{% endif %}
</div>
{% endif %}
<article class="s_title u_mar50 topmargin">
<section>
<div class="u_mar50">
<h4 class="s_title_left blue">
商品説明
<span class="title">
DETAIL
</span>
</h4>
<!-- <div class="s_title_right gold"></div> -->
<img src="{{ asset('assets/img/common/cat_line.jpg') }}" class="line_cart">
</div>
<div class="ec-productRole__description pro-deitals_subcomment content__mobile">
{{ Product.description_detail|raw }}
</div>
</section>
</article>
{% set lastIndex = null %}
{% for i in 1..10 if attribute(Product, 'sub_title_' ~ i)|trim is not empty or attribute(Product, 'sub_comment' ~ i)|trim is not empty %}
{% set lastIndex = i %}
{% endfor %}
{% for i in 1..10 %}
{% if attribute(Product, 'sub_title_' ~ i)|trim is not empty or attribute(Product, 'sub_comment' ~ i)|trim is not empty %}
<div class="main-item">
{% if i == lastIndex %}
<div class="title__info">
商品情報
<img src="{{ asset('assets/img/common/btn_minus.png') }}" class="btn-action" alt="Btn Minus">
</div>
{% endif %}
<div class="ec-productRole__description pro-deitals_subcomment item__active">
<b>{{ attribute(Product, 'sub_title_' ~ i)|raw }}</b>
{% if attribute(Product, 'sub_title_' ~ i)|trim is not empty %}
<br>
{% endif %}
{{ attribute(Product, 'sub_comment' ~ i)|raw }}
</div>
</div>
{% endif %}
{% endfor %}
<div class="ec-modal-box-image-overlay"></div>
<div class="ec-modal-box-image">
<div class="icon-close">
<i class="fa-solid fa-x"></i>
</div>
<div class="image-container">
<img src="" alt="Image Detail">
</div>
</div>
</div>
{% endblock %}