- Timestamp:
- 2007/09/05 11:01:20 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/feature-module-update/data/class/util/SC_Utils.php
r15592 r15604 912 912 } 913 913 914 /* 集計情報を元に最終計算 */915 function sfTotalConfirm($arrData, $objPage, $objCartSess, $arrInfo, $objCustomer = "") {916 // 未定義変数を定義917 if (!isset($arrData['deliv_pref'])) $arrData['deliv_pref'] = "";918 if (!isset($arrData['payment_id'])) $arrData['payment_id'] = "";919 if (!isset($arrData['charge'])) $arrData['charge'] = "";920 if (!isset($arrData['use_point'])) $arrData['use_point'] = "";921 922 // 商品の合計個数923 $total_quantity = $objCartSess->getTotalQuantity(true);924 925 // 税金の取得926 $arrData['tax'] = $objPage->tpl_total_tax;927 // 小計の取得928 $arrData['subtotal'] = $objPage->tpl_total_pretax;929 930 // 合計送料の取得931 $arrData['deliv_fee'] = 0;932 933 // 商品ごとの送料が有効の場合934 if (OPTION_PRODUCT_DELIV_FEE == 1) {935 $arrData['deliv_fee']+= $objCartSess->getAllProductsDelivFee();936 }937 938 // 配送業者の送料が有効の場合939 if (OPTION_DELIV_FEE == 1) {940 // 送料の合計を計算する941 $arrData['deliv_fee']942 += SC_Utils::sfGetDelivFee($arrData['deliv_pref'],943 $arrData['payment_id']);944 945 }946 947 // 送料無料の購入数が設定されている場合948 if(DELIV_FREE_AMOUNT > 0) {949 if($total_quantity >= DELIV_FREE_AMOUNT) {950 $arrData['deliv_fee'] = 0;951 }952 }953 954 // 送料無料条件が設定されている場合955 if($arrInfo['free_rule'] > 0) {956 // 小計が無料条件を超えている場合957 if($arrData['subtotal'] >= $arrInfo['free_rule']) {958 $arrData['deliv_fee'] = 0;959 }960 }961 962 // 合計の計算963 $arrData['total'] = $objPage->tpl_total_pretax; // 商品合計964 $arrData['total']+= $arrData['deliv_fee']; // 送料965 $arrData['total']+= $arrData['charge']; // 手数料966 // お支払い合計967 $arrData['payment_total'] = $arrData['total'] - ($arrData['use_point'] * POINT_VALUE);968 // 加算ポイントの計算969 $arrData['add_point'] = SC_Utils::sfGetAddPoint($objPage->tpl_total_point, $arrData['use_point'], $arrInfo);970 971 if($objCustomer != "") {972 // 誕生日月であった場合973 if($objCustomer->isBirthMonth()) {974 $arrData['birth_point'] = BIRTH_MONTH_POINT;975 $arrData['add_point'] += $arrData['birth_point'];976 }977 }978 979 if($arrData['add_point'] < 0) {980 $arrData['add_point'] = 0;981 }982 983 return $arrData;984 }985 986 914 /* DBから取り出した日付の文字列を調整する。*/ 987 915 function sfDispDBDate($dbdate, $time = true) {
Note: See TracChangeset
for help on using the changeset viewer.
