Created
June 7, 2016 05:09
-
-
Save nanasess/51fcb227ca6397a07131274687c80ea4 to your computer and use it in GitHub Desktop.
EC-CUBE2.13 規格ごとに価格を表示するパッチ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/data/Smarty/templates/default/products/list.tpl b/data/Smarty/templates/default/products/list.tpl | |
index a2b8e3d..8cc72ac 100644 | |
--- a/data/Smarty/templates/default/products/list.tpl | |
+++ b/data/Smarty/templates/default/products/list.tpl | |
@@ -197,6 +197,13 @@ | |
<!--▼買い物カゴ--> | |
<div class="cart_area clearfix"> | |
+ <!--{if $tpl_classcat_find1[$id]}--> | |
+ <!--{foreach from=$classCategory1[$id] item=classcate}--> | |
+ <!--{if $classcate.name}--> | |
+ <p><!--{$classcate.name}-->: <!--{$classcate.price}-->円</p> | |
+ <!--{/if}--> | |
+ <!--{/foreach}--> | |
+ <!--{/if}--> | |
<!--{if $tpl_stock_find[$id]}--> | |
<!--{if $tpl_classcat_find1[$id]}--> | |
<div class="classlist"> | |
diff --git a/data/class/SC_Product.php b/data/class/SC_Product.php | |
index c5ea95f..7bf6a3a 100644 | |
--- a/data/class/SC_Product.php | |
+++ b/data/class/SC_Product.php | |
@@ -289,6 +289,7 @@ __EOS__; | |
if (!in_array($classcategory_id1, $classCats1)) { | |
$classCats1[$classcategory_id1] = $arrProductsClass['classcategory_name1'] | |
. ($classcategory_id2 == 0 && !$stock_find_class ? ' (品切れ中)' : ''); | |
+ $classCategory1[$classcategory_id1] = array('name' => $arrProductsClass['classcategory_name1'], 'price' => $arrProductsClass['price02']); | |
} | |
// 価格 | |
@@ -329,6 +330,7 @@ __EOS__; | |
// 規格1 | |
$this->classCats1[$productId] = $classCats1; | |
+ $this->classCategory1[$productId] = $classCategory1; | |
} | |
} | |
@@ -404,10 +406,10 @@ __EOS__; | |
// 税込計算 | |
if (!SC_Utils_Ex::isBlank($arrProduct['price01'])) { | |
- $arrProduct['price01_inctax'] = SC_Helper_TaxRule_Ex::sfCalcIncTax($arrProduct['price01'], $arrProduct['product_id'], $productClassId); | |
+ $arrProduct['price01_inctax'] = SC_Helper_TaxRule_Ex::sfCalcIncTax($arrProduct['price01'], $arrProduct['product_id'], $productClassId); | |
} | |
if (!SC_Utils_Ex::isBlank($arrProduct['price02'])) { | |
- $arrProduct['price02_inctax'] = SC_Helper_TaxRule_Ex::sfCalcIncTax($arrProduct['price02'], $arrProduct['product_id'], $productClassId); | |
+ $arrProduct['price02_inctax'] = SC_Helper_TaxRule_Ex::sfCalcIncTax($arrProduct['price02'], $arrProduct['product_id'], $productClassId); | |
} | |
return $arrProduct; | |
diff --git a/data/class/pages/products/LC_Page_Products_List.php b/data/class/pages/products/LC_Page_Products_List.php | |
index 5c66d66..4f5b328 100644 | |
--- a/data/class/pages/products/LC_Page_Products_List.php | |
+++ b/data/class/pages/products/LC_Page_Products_List.php | |
@@ -519,6 +519,7 @@ class LC_Page_Products_List extends LC_Page_Ex | |
// 規格1 | |
$this->arrClassCat1 = $objProduct->classCats1; | |
+ $this->classCategory1 = $objProduct->classCategory1; | |
// 規格1が設定されている | |
$this->tpl_classcat_find1 = $objProduct->classCat1_find; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment