EC-CUBE2.12:faceboxからcolorboxに変更

(1)colorboxファイルをダウンロード。http://www.jacklmoore.com/colorbox
■html/jsフォルダに追加する。フォルダ名は「jquery.colorbox」

(2)■data/Smarty/templates/default/site_frame.tplの内に下記を追記。

<!--ColorBox-->
<link media="screen" rel="stylesheet" href="<!--{$smarty.const.ROOT_URLPATH}-->js/jquery.colorbox/colorbox.css" />
<script type="text/javascript" src="<!--{$smarty.const.ROOT_URLPATH}-->js/jquery.colorbox/jquery.colorbox.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$(".cbox").colorbox();
});
</script>


(3)■data/Smarty/templates/default/products/detail.tpl
下記コードは必要ないが、とりあえずそのままにしておく。

<script type="text/javascript" src="<!--{$smarty.const.ROOT_URLPATH}-->js/jquery.facebox/facebox.js"></script>
<link rel="stylesheet" type="text/css" href="<!--{$smarty.const.ROOT_URLPATH}-->js/jquery.facebox/facebox.css" media="screen" />

$(document).ready(function() {
$('a.expansion').facebox({
loadingImage : '<!--{$smarty.const.ROOT_URLPATH}-->js/jquery.facebox/loading.gif',
closeImage   : '<!--{$smarty.const.ROOT_URLPATH}-->js/jquery.facebox/closelabel.png'
});
});

するの箇所、下記コードを変更

class="expansion"
target="_blank"

↓(変更)

class="cbox"
title="<!--{$arrProduct.name|h}-->"

(4)■data/Smarty/templates/default/cart/index.tpl
①下記コードは必要ないが、とりあえずそのままにしておく。

<script type="text/javascript" src="<!--{$smarty.const.ROOT_URLPATH}-->js/jquery.facebox/facebox.js"></script>
<link rel="stylesheet" type="text/css" href="<!--{$smarty.const.ROOT_URLPATH}-->js/jquery.facebox/facebox.css" media="screen" />
<script type="text/javascript">//<![CDATA[
$(document).ready(function() {
$('a.expansion').facebox({
loadingImage : '<!--{$smarty.const.ROOT_URLPATH}-->js/jquery.facebox/loading.gif',
closeImage   : '<!--{$smarty.const.ROOT_URLPATH}-->js/jquery.facebox/closelabel.png'
});
});
//]]></script>

画像へのリンク箇所を変更

class="expansion" target="_blank"

↓(変更)

class="cbox" title="<!--{$item.productsClass.name|h}-->"

(5)■data/Smarty/templates/default/shopping/confirm.tpl
下記コードは必要ないが、とりあえずそのままにしておく。

<script type="text/javascript" src="<!--{$smarty.const.ROOT_URLPATH}-->js/jquery.facebox/facebox.js"></script>
<link rel="stylesheet" type="text/css" href="<!--{$smarty.const.ROOT_URLPATH}-->js/jquery.facebox/facebox.css" media="screen" />

$(document).ready(function() {
$('a.expansion').facebox({
loadingImage : '<!--{$smarty.const.ROOT_URLPATH}-->js/jquery.facebox/loading.gif',
closeImage   : '<!--{$smarty.const.ROOT_URLPATH}-->js/jquery.facebox/closelabel.png'
});
});

画像へのリンク箇所を変更

class="expansion" target="_blank"

↓(変更)

class="cbox" title="<!--{$item.productsClass.name|h}-->"