Changeset 23405
- Timestamp:
- 2014/05/08 18:40:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_13-dev/data/class/helper/SC_Helper_TaxRule.php
r23334 r23405 122 122 * @return array 税設定情報 123 123 */ 124 public function getTaxRule ($product_id = 0, $product_class_id = 0, $pref_id = 0, $country_id = 0) 125 { 124 public function getTaxRule($product_id = 0, $product_class_id = 0, $pref_id = 0, $country_id = 0) 125 { 126 // 複数回呼出があるのでキャッシュ化 127 static $data_c = array(); 128 126 129 // 初期化 127 130 $product_id = $product_id > 0 ? $product_id : 0; … … 129 132 $pref_id = $pref_id > 0 ? $pref_id : 0; 130 133 $country_id = $country_id > 0 ? $country_id : 0; 131 // ログイン済み会員で国と地域指定が無い場合は、会員情報をデフォルトで利用。管理画面では利用しない132 if (!(defined('ADMIN_FUNCTION') && ADMIN_FUNCTION == true)) {133 $objCustomer = new SC_Customer_Ex();134 if ($objCustomer->isLoginSuccess(true)) {135 if ($country_id == 0) {136 $country_id = $objCustomer->getValue('country_id');137 }138 if ($pref_id == 0) {139 $pref_id = $objCustomer->getValue('pref');140 }141 }142 }143 134 144 135 // 一覧画面の速度向上のため商品単位税率設定がOFFの時はキャッシュキーを丸めてしまう … … 149 140 } 150 141 151 // 複数回呼出があるのでキャッシュ化152 static $data_c = array();153 154 142 if (empty($data_c[$cache_key])) { 143 // ログイン済み会員で国と地域指定が無い場合は、会員情報をデフォルトで利用。管理画面では利用しない 144 if (!(defined('ADMIN_FUNCTION') && ADMIN_FUNCTION == true)) { 145 $objCustomer = new SC_Customer_Ex(); 146 if ($objCustomer->isLoginSuccess(true)) { 147 if ($country_id == 0) { 148 $country_id = $objCustomer->getValue('country_id'); 149 } 150 if ($pref_id == 0) { 151 $pref_id = $objCustomer->getValue('pref'); 152 } 153 } 154 } 155 155 156 $arrRet = array(); 156 157 // リクエストの配列化
Note: See TracChangeset
for help on using the changeset viewer.