- Timestamp:
- 2007/08/24 21:56:02 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/feature-module-update/data/class/util/SC_Utils.php
r15343 r15351 732 732 } 733 733 734 /* 所属するすべての階層の親IDを配列で返す */735 function sfGetParents($objQuery, $table, $pid_name, $id_name, $id) {736 $arrRet = SC_Utils::sfGetParentsArray($table, $pid_name, $id_name, $id);737 // 配列の先頭1つを削除する。738 array_shift($arrRet);739 return $arrRet;740 }741 742 743 734 /* 親IDの配列を元に特定のカラムを取得する。*/ 744 735 function sfGetParentsCol($objQuery, $table, $id_name, $col_name, $arrId ) { … … 757 748 $objQuery->setorder("level"); 758 749 $arrRet = $objQuery->select($col, $table, $where, $arrId); 759 return $arrRet;760 }761 762 /* 子IDの配列を返す */763 function sfGetChildsID($table, $pid_name, $id_name, $id) {764 $arrRet = SC_Utils::sfGetChildrenArray($table, $pid_name, $id_name, $id);765 750 return $arrRet; 766 751 } … … 866 851 } 867 852 //複数のキャンペーンに登録されている商品は、最新のキャンペーンからポイントを取得 868 if($arrRet[0]['campaign_point_rate'] != "") { 853 if(isset($arrRet[0]['campaign_point_rate']) 854 && $arrRet[0]['campaign_point_rate'] != "") { 855 869 856 $campaign_point_rate = $arrRet[0]['campaign_point_rate']; 870 857 $real_point = $campaign_point_rate / 100; … … 892 879 } 893 880 //キャンペーン商品の場合 894 if( $campaign_point_rate != "") {881 if(isset($campaign_point_rate) && $campaign_point_rate != "") { 895 882 $ret = "(".$arrRet[0]['campaign_name']."ポイント率".$campaign_point_rate."%)".$ret; 896 883 } … … 963 950 /* 集計情報を元に最終計算 */ 964 951 function sfTotalConfirm($arrData, $objPage, $objCartSess, $arrInfo, $objCustomer = "") { 952 // 未定義変数を定義 953 if (!isset($arrData['deliv_pref'])) $arrData['deliv_pref'] = ""; 954 if (!isset($arrData['payment_id'])) $arrData['payment_id'] = ""; 955 if (!isset($arrData['charge'])) $arrData['charge'] = ""; 956 if (!isset($arrData['use_point'])) $arrData['use_point'] = ""; 957 965 958 // 商品の合計個数 966 959 $total_quantity = $objCartSess->getTotalQuantity(true); … … 982 975 if (OPTION_DELIV_FEE == 1) { 983 976 // 送料の合計を計算する 984 $arrData['deliv_fee']+= SC_Utils::sfGetDelivFee($arrData['deliv_pref'], $arrData['payment_id']); 977 $arrData['deliv_fee'] 978 += SC_Utils::sfGetDelivFee($arrData['deliv_pref'], 979 $arrData['payment_id']); 980 985 981 } 986 982 … … 1378 1374 } 1379 1375 1380 /* カテゴリから商品を検索する場合のWHERE文と値を返す */1381 function sfGetCatWhere($category_id) {1382 // 子カテゴリIDの取得1383 $arrRet = SC_Utils::sfGetChildsID("dtb_category", "parent_category_id", "category_id", $category_id);1384 $tmp_where = "";1385 foreach ($arrRet as $val) {1386 if($tmp_where == "") {1387 $tmp_where.= " category_id IN ( ?";1388 } else {1389 $tmp_where.= ",? ";1390 }1391 $arrval[] = $val;1392 }1393 $tmp_where.= " ) ";1394 return array($tmp_where, $arrval);1395 }1396 1397 1376 /* 加算ポイントの計算式 */ 1398 1377 function sfGetAddPoint($totalpoint, $use_point, $arrInfo) {
Note: See TracChangeset
for help on using the changeset viewer.