{#
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>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css" />
<link rel="stylesheet" href="/html/template/default/assets/css/swiper-customize.min.css">
<style>
#modalWrapAlert {
display: none;
background: 0 0;
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
z-index: 100;
overflow: hidden
}
.modalBoxAlert {
position: fixed;
width: 85%;
max-width: 420px;
height: 0;
top: 0;
bottom: 0;
left: 0;
right: 0;
margin: auto;
overflow: hidden;
opacity: 1;
display: none;
border-radius: 3px;
z-index: 1000
}
.modalInnerAlert {
padding: 10px;
text-align: center;
box-sizing: border-box;
background: rgba(0, 0, 0, .7);
color: #fff
}
</style>
{% endblock %}
{% block javascript %}
{# この商品の最上位カテゴリidを取得 #}
{% set rootCategoryId = null %}
{% for ProductCategory in Product.ProductCategories %}
{% set Category = ProductCategory.Category %}
{% set rootCategory = Category %}
{% for i in 1..10 if rootCategory.Parent %}
{% set rootCategory = rootCategory.Parent %}
{% endfor %}
{% set rootCategoryId = rootCategory.id %}
{% endfor %}
<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);
}
{# ▼▼▼GOLFPRINT:▼▼▼ #}
{% if rootCategoryId == 7 %}{# ボールを選ぶ #}
window.addEventListener('load', () => {
const selectElement = document.getElementById('classcategory_id1');
if (selectElement) {
selectElement.selectedIndex = 1; // 2番目のoptionを選択
// 規格1の選択後に規格2の選択肢を設定
fnSetClassCategories($('#form1'), null);
// イベント発火処理(ネイティブ+jQuery)
const triggerChangeEvents = () => {
// 規格1の変更イベントを発火
$(selectElement).trigger('change');
};
// 規格1の変更イベントを発火(300msの遅延を追加)
setTimeout(triggerChangeEvents, 300);
}
{% 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);
{% else %}
// 規格が存在しない場合の処理
eccube.checkStock($('#form1'), {{ Product.id }}, null, null);
{% endif %}
});
{% elseif rootCategoryId == 8 %}{# マーカーを選ぶ #}
{% elseif rootCategoryId == 9 %}{# デザインを選ぶ #}
{% elseif rootCategoryId == 10 %}{# ラッピング #}
{% 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 %}
{% endif %}
{# ▲▲▲GOLFPRINT:▲▲▲ #}
</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: {
dots: true
}
}]
});
$('.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, .inlineBtn--cancel').on('click', function() {
$('.ec-modal').hide()
});
</script>
<script type="application/ld+json">
{
"@context": "https://schema.org/",
"@type": "Product",
"name": "{{ Product.name }}",
"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>
<script src="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.js"></script>
<script>
// swiperを生成
var swiperMain = new Swiper('.swiper-container', {
effect: 'fade', // フェードエフェクトを適用
speed: 600,
loop: true,
pagination: {
el: '.swiper-pagination',
clickable: true,
},
navigation: { // コメントアウトまたは削除
nextEl: '.swiper-button-next',
prevEl: '.swiper-button-prev',
},
});
// slideToメソッドを実行する関数を定義
function slideThumb(index) {
swiperMain.slideTo(index);
}
</script>
<script>
{% if rootCategoryId == 7 %}{# ボールを選ぶ #}
$(function() {
$('.ball_type').change(function() {
let selCnt = 0;
const ballType = document.forms.formSelPC.ball_type;
for( let i=0; i < ballType.length; i++ ) {
if( ballType[i].checked ) {
selCnt++;
}
}
if( selCnt == ballType.length ) {
for( let i=0; i < ballType.length; i++ ) {
ballType[i].checked = false;
}
//alert('絞り込みたい項目がある場合のみチェックしてください。');
selAlert();
}
});
$('.ball_nums').change(function() {
let selCnt = 0;
const ballNums = document.forms.formSelPC.ball_nums;
for( let i=0; i < ballNums.length; i++ ) {
if( ballNums[i].checked ) {
selCnt++;
}
}
if( selCnt == ballNums.length ) {
for( let i=0; i < ballNums.length; i++ ) {
ballNums[i].checked = false;
}
//alert('絞り込みたい項目がある場合のみチェックしてください。');
selAlert();
}
});
$('.ball_price').change(function() {
let selCnt = 0;
const ballPrice = document.forms.formSelPC.ball_price;
for( let i=0; i < ballPrice.length; i++ ) {
if( ballPrice[i].checked ) {
selCnt++;
}
}
if( selCnt == ballPrice.length ) {
for( let i=0; i < ballPrice.length; i++ ) {
ballPrice[i].checked = false;
}
//alert('絞り込みたい項目がある場合のみチェックしてください。');
selAlert();
}
});
$('.ball_type_sp').change(function() {
let selCnt = 0;
const ballType = document.forms.formSelSP.ball_type;
for( let i=0; i < ballType.length; i++ ) {
if( ballType[i].checked ) {
selCnt++;
}
}
if( selCnt == ballType.length ) {
for( let i=0; i < ballType.length; i++ ) {
ballType[i].checked = false;
}
//alert('絞り込みたい項目がある場合のみチェックしてください。');
selAlert();
}
});
$('.ball_nums_sp').change(function() {
let selCnt = 0;
const ballNums = document.forms.formSelSP.ball_nums;
for( let i=0; i < ballNums.length; i++ ) {
if( ballNums[i].checked ) {
selCnt++;
}
}
if( selCnt == ballNums.length ) {
for( let i=0; i < ballNums.length; i++ ) {
ballNums[i].checked = false;
}
//alert('絞り込みたい項目がある場合のみチェックしてください。');
selAlert();
}
});
$('.ball_price_sp').change(function() {
let selCnt = 0;
const ballPrice = document.forms.formSelSP.ball_price;
for( let i=0; i < ballPrice.length; i++ ) {
if( ballPrice[i].checked ) {
selCnt++;
}
}
if( selCnt == ballPrice.length ) {
for( let i=0; i < ballPrice.length; i++ ) {
ballPrice[i].checked = false;
}
//alert('絞り込みたい項目がある場合のみチェックしてください。');
selAlert();
}
});
});
function setValPC() {
let sels_type = '';
const ballType = document.forms.formSelPC.ball_type;
for( let i=0; i < ballType.length; i++ ) {
if( ballType[i].checked ) {
if( sels_type ) {
sels_type = sels_type + ',';
}
sels_type = sels_type + ballType[i].value;
}
}
document.forms.formSelPC2.elements['ball-type'].value = sels_type;
let sels_nums = '';
const ballNums = document.forms.formSelPC.ball_nums;
for( let i=0; i < ballNums.length; i++ ) {
if( ballNums[i].checked ) {
if( sels_nums ) {
sels_nums = sels_nums + ',';
}
sels_nums = sels_nums + ballNums[i].value;
}
}
document.forms.formSelPC2.elements['ball-nums'].value = sels_nums;
let sels_price = '';
const ballPrice = document.forms.formSelPC.ball_price;
for( let i=0; i < ballPrice.length; i++ ) {
if( ballPrice[i].checked ) {
if( sels_price ) {
sels_price = sels_price + ',';
}
sels_price = sels_price + ballPrice[i].value;
}
}
document.forms.formSelPC2.elements['ball-price'].value = sels_price;
document.forms.formSelPC2.submit();
}
function setValSP() {
let sels_type = '';
const ballType = document.forms.formSelSP.ball_type;
for( let i=0; i < ballType.length; i++ ) {
if( ballType[i].checked ) {
if( sels_type ) {
sels_type = sels_type + ',';
}
sels_type = sels_type + ballType[i].value;
}
}
document.forms.formSelSP2.elements['ball-type'].value = sels_type;
let sels_nums = '';
const ballNums = document.forms.formSelSP.ball_nums;
for( let i=0; i < ballNums.length; i++ ) {
if( ballNums[i].checked ) {
if( sels_nums ) {
sels_nums = sels_nums + ',';
}
sels_nums = sels_nums + ballNums[i].value;
}
}
document.forms.formSelSP2.elements['ball-nums'].value = sels_nums;
let sels_price = '';
const ballPrice = document.forms.formSelSP.ball_price;
for( let i=0; i < ballPrice.length; i++ ) {
if( ballPrice[i].checked ) {
if( sels_price ) {
sels_price = sels_price + ',';
}
sels_price = sels_price + ballPrice[i].value;
}
}
document.forms.formSelSP2.elements['ball-price'].value = sels_price;
document.forms.formSelSP2.submit();
}
{% elseif rootCategoryId == 8 %}{# マーカーを選ぶ #}
{% elseif rootCategoryId == 9 %}{# デザインを選ぶ #}
$(function() {
$('.design_cate').change(function() {
let selCnt = 0;
const designCate = document.forms.formSelPC.design_cate;
for( let i=0; i < designCate.length; i++ ) {
if( designCate[i].checked ) {
selCnt++;
}
}
if( selCnt == designCate.length ) {
for( let i=0; i < designCate.length; i++ ) {
designCate[i].checked = false;
}
//alert('絞り込みたい項目がある場合のみチェックしてください。');
selAlert();
}
});
$('.design_cate_sp').change(function() {
let selCnt = 0;
const designCate = document.forms.formSelSP.design_cate;
for( let i=0; i < designCate.length; i++ ) {
if( designCate[i].checked ) {
selCnt++;
}
}
if( selCnt == designCate.length ) {
for( let i=0; i < designCate.length; i++ ) {
designCate[i].checked = false;
}
//alert('絞り込みたい項目がある場合のみチェックしてください。');
selAlert();
}
});
});
function setValPC() {
let sels_design = '';
const designCate = document.forms.formSelPC.design_cate;
for( let i=0; i < designCate.length; i++ ) {
if( designCate[i].checked ) {
if( sels_design ) {
sels_design = sels_design + ',';
}
sels_design = sels_design + designCate[i].value;
}
}
document.forms.formSelPC2.elements['design-cate'].value = sels_design;
document.forms.formSelPC2.submit();
}
function setValSP() {
let sels_design = '';
const designCate = document.forms.formSelSP.design_cate;
for( let i=0; i < designCate.length; i++ ) {
if( designCate[i].checked ) {
if( sels_design ) {
sels_design = sels_design + ',';
}
sels_design = sels_design + designCate[i].value;
}
}
document.forms.formSelSP2.elements['design-cate'].value = sels_design;
document.forms.formSelSP2.submit();
}
{% elseif rootCategoryId == 10 %}{# ラッピング #}
{% endif %}
</script>
<script>
function selAlert() {
var modalThis = $('body').find('#alert01');
//bodyの最下にwrapを作る
$('body').append('<div id="modalWrapAlert" />');
var wrap = $('#modalWrapAlert');
wrap.fadeIn('200');
modalThis.fadeIn('200');
//モーダルの高さを取ってくる
function mdlHeight() {
var wh = $(window).innerHeight();
var attH = modalThis.find('.modalInnerAlert').innerHeight();
modalThis.css({
height: attH
});
}
mdlHeight();
$(window).on('resize', function () {
mdlHeight();
});
function clickAction() {
modalThis.fadeOut('200');
wrap.fadeOut('200', function () {
wrap.remove();
});
}
//wrapクリックされたら
wrap.on('click', function () {
clickAction();
return false;
});
//2秒後に消える
setTimeout(clickAction, 2000);
return false;
}
</script>
{% endblock %}
{% block main %}
{# この商品の最上位カテゴリidを取得 #}
{% set rootCategoryId = null %}
{% for ProductCategory in Product.ProductCategories %}
{% set Category = ProductCategory.Category %}
{% set rootCategory = Category %}
{% for i in 1..10 if rootCategory.Parent %}
{% set rootCategory = rootCategory.Parent %}
{% endfor %}
{% set rootCategoryId = rootCategory.id %}
{% endfor %}
<div class="container">
<!-- パンくずリスト -->
<nav aria-label="breadcrumb" class="my-3">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="{{ url('homepage') }}">ホーム</a></li>
{% if rootCategoryId == 7 %}{# ボールを選ぶ #}
<li class="breadcrumb-item"><a href="{{ url('product_list', {'category_id': 7}) }}">ボールを選ぶ</a></li>
<li class="breadcrumb-item active" aria-current="page">{{ Product.name }}</li>
{% elseif rootCategoryId == 8 %}{# マーカーを選ぶ #}
{% elseif rootCategoryId == 9 %}{# デザインを選ぶ #}
<li class="breadcrumb-item"><a href="{{ url('product_list', {'category_id': 9}) }}">デザインを選ぶ</a></li>
<li class="breadcrumb-item active" aria-current="page">{{ Product.name }}</li>
{% elseif rootCategoryId == 10 %}{# ラッピング #}
{% endif %}
</ol>
</nav>
<div class="layout-2colmun">
{% if rootCategoryId == 7 %}{# ボールを選ぶ #}
{{ include('Product/aside_ball.twig') }}
{% elseif rootCategoryId == 8 %}{# マーカーを選ぶ #}
{% elseif rootCategoryId == 9 %}{# デザインを選ぶ #}
{{ include('Product/aside_design.twig') }}
{% elseif rootCategoryId == 10 %}{# ラッピング #}
{% endif %}
<main class="main">
<div class="row mb-5">
<div class="col-md-6">
<div id="product-detail">
<!-- main -->
<div class="swiper-container">
<div class="swiper-wrapper">
{% for ProductImage in Product.ProductImage %}
<div class="swiper-slide" style="background-image: url('{{ asset(ProductImage, 'save_image') }}'); background-size: contain; background-repeat: no-repeat;"></div>
{% else %}
<div class="swiper-slide" style="background-image: url('{{ asset(''|no_image_product, 'save_image') }}'); background-size: contain; background-repeat: no-repeat;"></div>
{% endfor %}
</div>
<div class="swiper-button-prev"></div>
<div class="swiper-button-next"></div>
</div>
<!-- thumbnail -->
<ul class="thumb-list">
{% for ProductImage in Product.ProductImage %}
<li class="thumb-item">
<a class="thumb-link" href="javascript:void(0);" onclick="slideThumb({{ loop.index0 }})" style="background-image: url('{{ asset(ProductImage, 'save_image') }}')"></a>
</li>
{% endfor %}
</ul>
</div>
</div>
<div class="col-md-6">
<h1 class="fw-bold _fs-5 mb-3">{{ Product.name }}</h1>
<div class="item-thumb mb-3">
{% for Tag in Product.Tags %}
{% if Tag.name == '一番人気' %}
<span class="icon -popular -large">一番人気</span>
{% elseif Tag.name == '即日配送' %}
<span class="icon -rapid -large">即日配送</span>
{% elseif Tag.name == '代引手数料無料' %}
<span class="icon -free -large">代引手数料無料</span>
{% elseif Tag.name == '送料無料' %}
<span class="icon -free -large">送料無料</span>
{% elseif Tag.name == '3%還元' %}
<span class="icon -point -large">3%還元</span>
{% elseif Tag.name == '人気' %}
<span class="icon -popular -large">人気</span>
{% endif %}
{% endfor %}
{% if rootCategoryId == 7 %}{# ボールを選ぶ #}
{% if Product.hasProductClass -%}
{% if Product.getPrice02IncTaxMin == Product.getPrice02IncTaxMax %}
<div class="price -large"><span class="price02-default">¥{{ Product.getPrice02IncTaxMin|number_format }}</span> <span>(税込)</span></div>
{% else %}
<div class="price -large"><span class="price02-default">¥{{ Product.getPrice02IncTaxMin|number_format }} ~ ¥{{ Product.getPrice02IncTaxMax|number_format }}</span> <span>(税込)</span></div>
{% endif %}
{% else %}
<div class="price -large"><span class="price02-default">¥{{ Product.getPrice02IncTaxMin|number_format }}</span> <span>(税込)</span></div>
{% endif %}
{% endif %}
</div>
<form action="{{ url('product_add_cart', {id:Product.id}) }}" method="post" id="form1" name="form1">
{% if rootCategoryId == 7 %}{# ボールを選ぶ #}
<div class="border-top border-bottom py-3 mb-4">
<div class="d-flex align-items-center pb-3">
<div class="w-25 text-end">{{ '商品コード'|trans }}:</div>
<div class="ps-3">{{ Product.code_min }}{% if Product.code_min != Product.code_max %} ~ {{ Product.code_max }}{% endif %}</div>
</div>
{% if Product.stock_find %}
{% if form.classcategory_id1 is defined %}
<div class="d-flex align-items-center pb-1 d-none">
{{ form_row(form.classcategory_id1) }}
{{ form_errors(form.classcategory_id1) }}
</div>
{% if form.classcategory_id2 is defined %}
<div class="detail-color pb-1">
{{ form_row(form.classcategory_id2) }}
{{ form_errors(form.classcategory_id2) }}
</div>
{% endif %}
{% endif %}
<div class="d-flex align-items-center py-1">
<div class="w-25 text-end">{{ '数量'|trans }}</div>
<div class="ps-3">
{{ form_widget(form.quantity) }}
{{ form_errors(form.quantity) }}
</div>
</div>
{% endif %}
</div>
{% elseif rootCategoryId == 8 %}{# マーカーを選ぶ #}
{% elseif rootCategoryId == 9 %}{# デザインを選ぶ #}
<div class="d-flex align-items-center pb-3">
<div class="text-start">{{ '商品コード'|trans }}:</div>
<div class="ps-3">{{ Product.code_min }}{% if Product.code_min != Product.code_max %} ~ {{ Product.code_max }}{% endif %}</div>
</div>
{% if Product.stock_find %}
{% if form.classcategory_id1 is defined %}
{{ form_row(form.classcategory_id1, {'attr': {'type': 'hidden'}}) }}
{{ form_errors(form.classcategory_id1) }}
{% if form.classcategory_id2 is defined %}
{{ form_row(form.classcategory_id2, {'attr': {'type': 'hidden'}}) }}
{{ form_errors(form.classcategory_id2) }}
{% endif %}
{% endif %}
{{ form_widget(form.quantity, {'type': 'hidden'}) }}
{{ form_errors(form.quantity) }}
{% endif %}
{% elseif rootCategoryId == 10 %}{# ラッピング #}
{% endif %}
<div class="d-flex justify-content-between">
{% if Product.stock_find %}
<a href="javascript:void(0);" class="me-1 btn btn-danger btn-lg rounded-0 w-100 add-cart"><i class="icon-shopping_cart"></i>{{ 'カートに入れる'|trans }}</a>
{% else %}
<button type="button" class="me-1 btn btn-danger btn-lg rounded-0 w-100" disabled="disabled">{{ 'ただいま品切れ中です。'|trans }}</button>
{% endif %}
{% if BaseInfo.option_favorite_product %}
{% if is_favorite == false %}
<a href="javascript:void(0);" onclick="document.forms.formFavorite.submit();" class="ms-1 btn btn-dark btn-lg rounded-0 w-100">{{ 'お気に入りに追加'|trans }}</a>
{% else %}
<button type="button" id="favorite" class="ms-1 btn btn-dark btn-lg rounded-0 w-100" disabled="disabled">{{ 'お気に入り登録済'|trans }}</button>
{% endif %}
{% endif %}
</div>
{{ form_rest(form) }}
</form>
{# お気に入りに追加用フォーム #}
<form action="{{ url('product_add_favorite', {id:Product.id}) }}" method="post" id="formFavorite" name="formFavorite"></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="btn btn-dark btn-lg me-2 mb-3 inlineBtn--cancel">{{ 'お買い物を続ける'|trans }}</span>
<a href="{{ url('cart') }}" class="btn btn-danger btn-lg mb-3"><i class="icon-shopping_cart"></i>{{ 'カートへ進む'|trans }}</a>
</div>
</div>
</div>
</div>
</div>
{##}
<div class="_bg-gray p-3 mt-4">
{% if rootCategoryId == 7 %}{# ボールを選ぶ #}
<ul class="list-unstyled mb-0">
<li>※価格は【印刷代込み(税込)】です。</li>
<li>※パッケージは予告なく変更になる場合がございます。</li>
<li>※3球単位で 1 デザイン印刷可能です。</li>
</ul>
{% elseif rootCategoryId == 8 %}{# マーカーを選ぶ #}
{% elseif rootCategoryId == 9 %}{# デザインを選ぶ #}
<ul class="list-unstyled mb-0">
<li>※3球単位で 1 デザイン印刷可能です。</li>
</ul>
{% elseif rootCategoryId == 10 %}{# ラッピング #}
{% endif %}
</div>
</div>
</div>
<div class="me-2 d-block d-lg-none">
<a href="" class="btn btn-outline-dark btn-lg w-100" data-bs-toggle="modal" data-bs-target="#filterModal">別の商品を見る</a>
</div>
<hr class="my-5">
{% if Product.freearea %}
<div class="ec-productRole__description">{{ Product.freearea|raw|nl2br }}</div>
{% endif %}
{# 商品管理 - 商品登録 商品説明 欄に入力!
<div class="text-center">
<img src="/html/template/default/assets/img/products/item01.png" width="600" height="600" alt="ゼクシオ リバウンド ドライブ II" class="img-fluid">
</div>
<p>
「ゼクシオ リバウンド ドライブ II」は、ダンロップが提供する高性能ゴルフボールです。
このボールは、ウレタンカバーとアイオノマーカバーの長所を融合し、柔らかな打感と優れたスピン性能、直進性、そして高い飛距離性能を実現しています。3層構造の「リバウンドフレーム」は、剛性の高いエリアと低いエリアを交互に配置し、各ショットで最適なパフォーマンスを発揮しま
す。また、ティーショットからパッティングまで、すべてのショットで高いパフォーマンスを提供する「ALL OK!」性能がさらに進化しています。
カラーバリエーションは、ホワイト、プレミアムホワイト、ライムイエロー、プレミアムピンク、X Mark Edition ホワイトの5種類があり、プレーヤー
の好みに合わせて選択できます。
</p>
#}
{% if rootCategoryId == 7 %}{# ボールを選ぶ #}
{{ include('Block/product_detail.twig') }}{# 印刷サイズ・サービス #}
{% elseif rootCategoryId == 8 %}{# マーカーを選ぶ #}
{% elseif rootCategoryId == 9 %}{# デザインを選ぶ #}
{{ include('Block/product_detail.twig') }}{# 印刷サイズ・サービス #}
{% elseif rootCategoryId == 10 %}{# ラッピング #}
{% endif %}
<form name="formSelSP2" id="formSelSP2" method="get" action="{{ url('product_list') }}">
<input type="hidden" name="mode">
{% if rootCategoryId == 7 %}{# ボールを選ぶ #}
<input type="hidden" name="category_id" value="7">
{% elseif rootCategoryId == 8 %}{# マーカーを選ぶ #}
{% elseif rootCategoryId == 9 %}{# デザインを選ぶ #}
<input type="hidden" name="category_id" value="9">
{% elseif rootCategoryId == 10 %}{# ラッピング #}
{% endif %}
<input type="hidden" name="name">
<input type="hidden" name="pageno" value="1">
<input type="hidden" name="disp_number" value="21">
<input type="hidden" name="orderby" value="2">
{% if rootCategoryId == 7 %}{# ボールを選ぶ #}
<input type="hidden" id="ball-type" name="ball-type">
<input type="hidden" id="ball-nums" name="ball-nums">
<input type="hidden" id="ball-price" name="ball-price">
{% elseif rootCategoryId == 8 %}{# マーカーを選ぶ #}
{% elseif rootCategoryId == 9 %}{# デザインを選ぶ #}
<input type="hidden" id="design-cate" name="design-cate">
{% elseif rootCategoryId == 10 %}{# ラッピング #}
{% endif %}
</form>
<div class="modalBoxAlert" id="alert01">
<div class="modalInnerAlert">
絞り込みたい項目がある場合のみチェックしてください。
</div>
</div>
</main>
</div>
</div>
<!-- modal -->
<div class="modal fade" id="filterModal" tabindex="-1" aria-labelledby="filterModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="filterModalLabel">絞り込み</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<form name="formSelSP" id="formSelSP">
<div class="modal-body">
<!-- 絞り込みフォームの内容をここに追加 -->
{% if rootCategoryId == 7 %}{# ボールを選ぶ #}
<div class="aside-filter _modal">
<div class="title">
ボールの種類から選ぶ
</div>
<ul class="list-unstyled mb-0 list">
<li>
<label>
<input type="checkbox" name="ball_type" class="ball_type_sp" value="14">
持ち込みボール
</label>
</li>
<li>
<label>
<input type="checkbox" name="ball_type" class="ball_type_sp" value="11">
スリクソン
</label>
</li>
<li>
<label>
<input type="checkbox" name="ball_type" class="ball_type_sp" value="12">
ゼクシオ
</label>
</li>
<li>
<label>
<input type="checkbox" name="ball_type" class="ball_type_sp" value="13">
ツアースペシャル
</label>
</li>
</ul>
<div class="title">
ボールの球数から選ぶ
</div>
<ul class="list-unstyled mb-0 list">
<li>
<label>
<input type="checkbox" name="ball_nums" class="ball_nums_sp" value="8,13">
3球
</label>
</li>
<li>
<label>
<input type="checkbox" name="ball_nums" class="ball_nums_sp" value="11,14">
6球
</label>
</li>
<li>
<label>
<input type="checkbox" name="ball_nums" class="ball_nums_sp" value="12,15">
12球
</label>
</li>
</ul>
<div class="title">
価格で選ぶ
</div>
<ul class="list-unstyled mb-0 list">
<li>
<label>
<input type="checkbox" name="ball_price" class="ball_price_sp" value="1">
~2,999円
</label>
</li>
<li>
<label>
<input type="checkbox" name="ball_price" class="ball_price_sp" value="2">
3,000円~4,999円
</label>
</li>
<li>
<label>
<input type="checkbox" name="ball_price" class="ball_price_sp" value="3">
5,000円~9,999円
</label>
</li>
<li>
<label>
<input type="checkbox" name="ball_price" class="ball_price_sp" value="4">
10,000円以上
</label>
</li>
</ul>
</div>
{% elseif rootCategoryId == 8 %}{# マーカーを選ぶ #}
{% elseif rootCategoryId == 9 %}{# デザインを選ぶ #}
<div class="aside-filter _modal">
<div class="title">
カテゴリから選ぶ
</div>
<ul class="list-unstyled mb-0 list">
<li>
<label>
<input type="checkbox" name="design_cate" class="design_cate_sp" value="15">
誕生日祝い
</label>
</li>
<li>
<label>
<input type="checkbox" name="design_cate" class="design_cate_sp" value="16">
定年退職祝い
</label>
</li>
<li>
<label>
<input type="checkbox" name="design_cate" class="design_cate_sp" value="17">
還暦祝い
</label>
</li>
<li>
<label>
<input type="checkbox" name="design_cate" class="design_cate_sp" value="18">
コンペ景品
</label>
</li>
<li>
<label>
<input type="checkbox" name="design_cate" class="design_cate_sp" value="19">
父の日祝い
</label>
</li>
<li>
<label>
<input type="checkbox" name="design_cate" class="design_cate_sp" value="20">
母の日祝い
</label>
</li>
<li>
<label>
<input type="checkbox" name="design_cate" class="design_cate_sp" value="21">
GOLFPRINT オリジナル
</label>
</li>
</ul>
</div>
{% elseif rootCategoryId == 10 %}{# ラッピング #}
{% endif %}
</div>
<div class="modal-footer">
<button type="button" class="btn btn-outline-dark" data-bs-dismiss="modal">閉じる</button>
<button type="button" class="btn btn-outline-dark" onclick="location.href='{{ url('product_detail', {'id': Product.id}) }}'">クリア</button>
<button type="button" onclick="setValSP()" class="btn btn-primary">絞り込む</button>
</div>
</form>
</div>
</div>
</div>
{% endblock %}