{% extends 'default_frame.twig' %}
{% block javascript %}
<style>
.mag_sns {
margin: 0 0 5px;
height: 60px;
display: table-cell;
vertical-align: bottom;
}
/* Number inputのアップダウンボタンを非表示にする */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
-webkit-appearance: none;
margin: 0;
}
input[type="number"] {
-moz-appearance: textfield; /* Firefox用 */
}
.lSSlideOuter {
width:230px;
overflow: hidden;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none
}
</style>
<script>
$(document).ready(function () {
$("#lightSlider").lightSlider({
item:1,
auto: true,
speed: 500,
pause: 4000,
gallery:true,
showThumbByDefault:true,
thumbItem:5,
loop: true,
adaptiveHeight:true
});
});
window.fbAsyncInit = function() {
FB.init({
appId : '1011828268866109',
xfbml : true,
status : true,
cookie : true,
channelURL : "{{ url('product_detail', {'id': Product.id}) }}",
oauth : true,
version : 'v2.6'
});
};
(function(d, s, id){
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {return;}
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/ja_JP/sdk.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
// 数量の増加
function plus(psms){
psms.value++;
if (psms.value > 1000){
psms.value = 1000;
}
}
// 数量の減少
function minus(psms){
psms.value--;
if (psms.value < 1){
psms.value = 1;
}
}
// カートモード
function cartmode(){
$('#sns').hide();
$('#cartbutton').find('ul').hide();
$('#cart').show();
}
</script>
{% endblock javascript %}
{% set catefl = 0 %}
{% for category in Product.ProductCategories %}
{% if category.Category.id == 315 %}
{% set catefl = 1 %}
{% endif %}
{% endfor %}
{% block main %}
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
{# ▼ ブロック:DispHtag ▼ #}
{{ include('Block/DispHtag.twig') }}
{# ▲ ブロック:DispHtag ▲ #}
<title>ベースボール・マガジン社 BBM@BOOK CART</title>
<meta name="description" content="ベースボール・マガジン社が運営する総合スポーツサイト。ベースボール・マガジン社発行の書籍・雑誌・スポーツカードなどの新着情報、各競技の技術情報や専門家によるコラムなど、スポーツファンを応援する情報が満載です。">
<meta name="keywords" content="ベースボールマガジン社,BBM">
<meta property="og:title" content="{{ Product.name }}" />
<meta property="og:type" content="website" />
<meta property="og:url" content="{{ app.request.uri }}" />
<meta property="og:image" content="{{ absolute_url(asset(Product.main_list_image|no_image_product, 'save_image')) }}">
<meta property="og:site_name" content="ベースボールマガジン社" />
<meta property="og:description" content="{{ Product.description_list|raw|nl2br }}" />
{# ▼ ブロック:DispHead ▼ #}
{% if catefl == 0 %}
{{ include('Block/DispHead.twig') }}
{% else %}
{{ include('Block/DispHead2.twig') }}
{% endif %}
{# ▲ ブロック:DispHead ▲ #}
</head>
<body id="pagetop" class="top">
{# ▼ ブロック:DispBtag ▼ #}
{{ include('Block/DispBtag.twig') }}
{# ▲ ブロック:DispBtag ▲ #}
{# ▼ ブロック:DispHeader ▼ #}
{% if catefl == 0 %}
{{ include('Block/DispHeader.twig') }}
{% else %}
{{ include('Block/DispHeaderLp.twig') }}
{% endif %}
{# ▲ ブロック:DispHeader ▲ #}
{% if catefl == 0 %}
<!--▼ CONTAINER ▼-->
<div id="container" class="clearfix">
{% set Cate3nd = null %}
{% set Cate2nd = null %}
{% set sportscard = 0 %}
<!--▼ パンくず ▼-->
<p id="topicpath">
{% if Product.ProductCategories is not empty %}
<a href="{{ url('bookcart') }}">ホーム</a>
{% for category in Product.ProductCategories %}
{% if category.Category and category.Category.id == 31 %}
{% set sportscard = 1 %}
{% endif %}
{% if category.Category.hierarchy > 1 %}
{% if category.Category.hierarchy == 2 %}
{% set Cate2nd = category.Category %}
{% endif %}
<a href="{{ url('product_list', {cateid: category.Category.id}) }}"> > {{ category.Category.name }}</a>
{% endif %}
{% if category.Category.hierarchy > 2 %}
{% if category.Category.hierarchy == 3 %}
{% set Cate3nd = category.Category %}
{% endif %}
{% endif %}
{% endfor %}
{% endif %}
</p>
<!--▲ パンくず ▲-->
<!--▼ タイトル画像 ▼-->
{% if Cate2nd and Cate2nd.titleImagePath %}
<h1><a href="{{ url('product_list', {'cateid': Cate2nd.id}) }}"><img src="{{ Cate2nd.titleImagePath }}"></a></h1>
{% endif %}
<!--▲ タイトル画像 ▲-->
<!--▼ CONTENTS ▼-->
<div id="contents">
<table border="0" width="750" cellpadding="0" cellspacing="0" class="magazinebox">
<tr>
<td colspan="3"><div class="magtop1"> </div></td>
</tr>
<tr>
<td valign="top" style="width:230px; padding-right: 10px;">
{% if Product.ProductImage|length > 1 %}
<ul id="lightSlider">
{% for ProductImage in Product.ProductImage %}
<li data-thumb="{{ asset(ProductImage, 'save_image') }}"><img src="{{ asset(ProductImage, 'save_image') }}" style="width:100%;" /></li>
{% else %}
<li data-thumb="{{ asset(''|no_image_product, 'save_image') }}"><img src="{{ asset(''|no_image_product, 'save_image') }}" style="width:100%;" /></li>
{% endfor %}
</ul>
{% else %}
{% set image = Product.ProductImage|first ?: ''|no_image_product %}
<img src="{{ asset(image, 'save_image') }}" style="width:100%;" />
{% endif %}
<div class="mag_img_zoom">
<!-- ▼ 拡大画像 ▼ -->
<a href="{{ asset(Product.main_list_image|no_image_product, 'save_image') }}" data-lightbox="image-1" data-title="{{ Product.name }}" data-alt="{{ Product.name }}" style="font-size: 14.4px;" target="_blank">画像を拡大する</a>
<!-- ▲ 拡大画像 ▲ -->
</div>
</td>
<td valign="top" class="magbg" style="width:430px; padding-right: 10px; font-size: 120%;">
<h3>
{% if Product.linkurl %}
<a href="{{ Product.linkurl }}">
{% endif %}
<!-- ▼ 商品名 ▼ -->
<span class="style-title1" style="font-size:20px;">
{{ Product.name|raw|nl2br }}
</span>
<!-- ▲ 商品名 ▲ -->
{% if Product.linkurl %}
</a>
{% endif %}
</h3>
{{ Product.comment1 }}<br>
{{ Product.hatsubaibi }}<br>
<!-- ▼ 商品コード ▼ -->
{% if Product.code_min is not empty %}
{{ Product.code_min }}{% if Product.code_min != Product.code_max %} ~ {{ Product.code_max }}{% endif %}<br>
{% endif %}
<!-- ▲ 商品コード ▲ -->
<!-- ▼ 印刷物サイズ ▲ -->
{{ Product.jissize }}<br>
<!-- ▲ 印刷物サイズ ▲ -->
{{ Product.teikaref }}
<!-- ▼ 販売価格 ▼ -->
{% if Product.hasProductClass %}
{% if Product.getPrice02Min == Product.getPrice02Max %}
{{ Product.getPrice02IncTaxMin|number_format }}円(税込)<br>
{% else %}
{{ Product.getPrice02IncTaxMin|number_format }} ~ {{ Product.getPrice02IncTaxMax|number_format }}円(税込)<br>
{% endif %}
{% else %}
{{ Product.getPrice02IncTaxMin|number_format }}円(税込)<br>
{% endif %}
<!-- ▲ 販売価格 ▲ -->
<!-- ▼ ISBNコード ▼ -->
{% if Product.isbn %}
ISBN:{{ Product.isbn }}<br>
{% endif %}
<!-- ▲ ISBNコード ▲ -->
<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 id="cart" class="mb10 mt40" style="display:none;">
<div class="mb10">
<span>数量:</span>
{{ form_widget(form.quantity, { attr : { style : "width:30px;"} }) }}
<a onclick="plus(document.getElementById('quantity')); return false">
<img src="{{ asset('common_img/button/btn_plus.jpg', 'user_data') }}" width="21" height="21" alt="+">
</a>
<a onclick="minus(document.getElementById('quantity')); return false">
<img src="{{ asset('common_img/button/btn_minus.jpg', 'user_data') }}" width="21" height="21" alt="-">
</a>
{{ form_errors(form.quantity) }}
</div>
<div class="mb10">
<button type="submit" class="hover_change_image"><img src="{{ asset('common_img/button/btn_cartin.jpg', 'user_data') }}" alt="カートに入れる"></button>
</div>
</div>
</div>
{% endif %}
{{ form_rest(form) }}
</form>
<div id="sns" class="mag_sns" style="display: flex; margin-top:20px;">
<div class="mag_fb">
<div class="fb-like" data-href="{{ url('product_detail', {'id': Product.id}) }}" data-layout="button_count" data-action="like" data-show-faces="true" data-share="true">
</div>
</div>
<div class="mag_tweet">
<a href="#" class="twitter-share-button" data-lang="ja">ツイート</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
</div>
</div>
</td>
<td id="cartbutton" width="250" valign="top" class="magbg">
<!--▼ BTN ▼-->
<ul class="mag_btnarea">
{% if Product.amazon %}
<li class="mb10"><a href="http://www.amazon.co.jp/dp/{{ Product.amazon }}?tag=fieldlogos-22" target="_blank"><img src="{{ asset('common_img/amazon_logo2.png', 'user_data') }}" alt="amazon.co.jpで買う"></a></li>
{% endif %}
{% if Product.stock_find %}
{% if Cate3nd and Cate3nd.id not in [35, 46] %}
{% if Product.bookcart != 1 %}
<li class="mb10"><img src="{{ asset('common_img/bookcart_logo.gif', 'user_data') }}" alt="カート" onclick="cartmode();" style="cursor: pointer;"></li>
{% endif %}
{% endif %}
{% else %}
{% if Cate3nd and Cate3nd.id not in [35, 46] %}
{% if Product.bookcart != 1 %}
<li class="mb10"><img src="{{ asset('common_img/zaikogire.gif', 'user_data') }}" alt="カート" onclick="cartmode();"></li>
{% endif %}
{% endif %}
{% endif %}
{% if Cate3nd and Cate3nd.id not in [49, 44, 75, 70, 57, 73] %}
{% if Cate3nd and Cate3nd.teikikoudoku1 > 0 %}
<li class="mb10"><a href="http://bbm-subscribe.com/products/detail.php?product_id={{ Cate3nd.teikikoudoku1 }}" target="_blank"><img src="{{ asset('common_img/btn01.jpg', 'user_data') }}" alt="定期購読"></a></li>
{% endif %}
{% if Cate3nd and Cate3nd.teikikoudoku2 > 0 %}
<li><a href="http://bbm-subscribe.com/postal/products/detail.php?product_id={{ Cate3nd.teikikoudoku2 }}" target="_blank"><img src="{{ asset('common_img/btn02.jpg', 'user_data') }}" alt="定期購読"></a></li>
{% endif %}
{% endif %}
</ul>
<!--▲ BTN ▲-->
</td>
</tr>
</table>
<table id="description" border="0" width="810" cellpadding="0" cellspacing="0" class="magazinebox" style="font-size: 120%;">
<tr>
<td>
{% if sportscard != 1 %}
<div><h3>CONTENTS</h3></div>
{% else %}
<style>
h2 {
width: 730px;
padding: 7px 10px 0;
background: #b9dded;
box-shadow: 3px 2px 4px 0 #8fbcd8;
margin: 0 0 8px;
font-size: 110%;
height: 25px;
color: #154766;
line-height: 100%;
}
</style>
{% endif %}
<div class="magbottom1" style="width: 730px;">{{ Product.description_detail|raw }}</div>
</td>
</tr>
</table>
{% if RecommendList %}
<!--▼おすすめ商品-->
<h2 class="mb30">おすすめ商品</h2>
<ul class="mag_list clearfix">
<!--▼ ARTICLE ▼-->
{% for Recommend in RecommendList %}
<li>
<a href="{{ url('product_detail', {'id': Recommend.id}) }}">
<div class="mag_img">
<img src="{{ asset(Recommend.main_list_image|no_image_product, 'save_image') }}" alt="{{ Recommend.name }}" />
<div class="mag_txt">
<h4>{{ Recommend.name }}</h4>
<!-- ▼ 販売価格 ▼ -->
{% if Recommend.hasProductClass %}
{% if Recommend.getPrice02Min == Recommend.getPrice02Max %}
{{ Recommend.getPrice02IncTaxMin|number_format }}円(税込)
{% else %}
{{ Recommend.getPrice02IncTaxMin|number_format }} ~ {{ Recommend.getPrice02IncTaxMax|number_format }}円(税込)
{% endif %}
{% else %}
{{ Recommend.getPrice02IncTaxMin|number_format }}円(税込)
{% endif %}
<!-- ▲ 販売価格 ▲ -->
</div>
</div>
</a>
</li>
{% endfor %}
<!--▲ ARTICLE ▲-->
</ul>
<!--▲おすすめ商品-->
{% endif %}
</div>
<!--▲ CONTENTS ▲-->
<!--▼ NAV ▼-->
<div id="snav">
<ul class="sbnr">
{% if Banners %}
{% for Banner in Banners %}
{% for cnt in 1..30 %}
{% set cntdsp = '%02d'|format(cnt) %}
{% set image = Banner['image'~cntdsp] %}
{% set link = Banner['link'~cntdsp] %}
{% set blank = Banner['blank'~cntdsp] %}
{% if image %}
{% if blank == 1 %}
{% set dspBlank = 'target="_blank"' %}
{% else %}
{% set dspBlank = '' %}
{% endif %}
<li>
<a href="{{ link }}" {{ dspBlank }}><img src="{{ asset('', 'save_image') }}/visual_{{ Banner.id }}/{{ image }}" width="240"></a>
</li>
{% endif %}
{% endfor %}
{% endfor %}
{% endif %}
</ul>
</div>
<!--▲ NAV ▲-->
</div>
<!--▲ CONTAINER ▲-->
<!--▼ GNAVI2 メインメニュ右 ▼-->
<div id="gnavi2" class="panel">
<div id="gnavi2_contents" class="clearfix">
{% if Cate2nd %}
{% for child_category in Cate2nd.children|reverse %}
{% if loop.index0 % 7 == 0 %}
{% if not loop.first %}
</ul>
{% endif %}
<ul class="gnavi2_ul mr40">
{% endif %}
<li><a href="{{ path('product_list', {cateid: child_category.id}) }}">{{ child_category.name }}</a></li>
{% if loop.last %}
</ul>
{% endif %}
{% endfor %}
{% endif %}
</div>
</div>
<!--▲ GNAVI02 メインメニュ右 ▲-->
{% else %}
<!--A-FORM ランディングページのとき-->
<div id="container" class="w1000">
<div id="content" class="w810">
<div id="contentbox">
{{ Product.description_detail|raw }}
</div>
</div>
</div>
{% endif %}
{# ▼ ブロック:DispFooter ▼ #}
{{ include('Block/DispFooter.twig') }}
{# ▲ ブロック:DispFooter ▲ #}
{# ▼ ブロック:DispFtag ▼ #}
{{ include('Block/DispFtag.twig') }}
{# ▲ ブロック:DispFtag ▲ #}
</body>
</html>
{% endblock %}
{# ▲ main ▲ #}