Changeset 22069 for branches/version-2_12-dev/data/class
- Timestamp:
- 2012/11/04 07:02:38 (11 years ago)
- Location:
- branches/version-2_12-dev/data/class
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_12-dev/data/class/helper/SC_Helper_Address.php
r22065 r22069 34 34 * お届け先を登録 35 35 * 36 * @param integer $customer_id37 36 * @param array $sqlval 38 * @param integer $other_deliv_id39 37 * @return array() 40 38 */ 41 function registAddress($customer_id, $sqlval, $other_deliv_id = '') {39 function save($sqlval) { 42 40 $objQuery =& SC_Query_Ex::getSingletonInstance(); 41 $customer_id = $sqlval['customer_id']; 42 $other_deliv_id = $sqlval['other_deliv_id']; 43 43 44 // 顧客IDのチェック 45 if (is_null($customer_id) || !is_numeric($customer_id) || !preg_match("/^\d+$/", $customer_id)) { 46 SC_Utils_Ex::sfDispSiteError(FREE_ERROR_MSG, '', false, '顧客IDを正しく指定して下さい。'); 47 } 44 48 // 追加 45 49 if (strlen($other_deliv_id == 0)) { … … 57 61 // 変更 58 62 } else { 59 $deliv_count = $objQuery->count('dtb_other_deliv',' customer_id = ? AND other_deliv_id = ?' ,array($customer_id,$other_deliv_id));63 $deliv_count = $objQuery->count('dtb_other_deliv','other_deliv_id = ?' ,array($other_deliv_id)); 60 64 if ($deliv_count != 1) { 61 65 SC_Utils_Ex::sfDispSiteError(FREE_ERROR_MSG, '', false, '一致する別のお届け先がありません。'); … … 70 74 * お届け先を取得 71 75 * 72 * @param integer $customer_id73 76 * @param integer $other_deliv_id 74 77 * @return array() 75 78 */ 76 function get Address($customer_id,$other_deliv_id) {79 function get($other_deliv_id) { 77 80 $objQuery =& SC_Query_Ex::getSingletonInstance(); 78 $address = $objQuery->select('*', 'dtb_other_deliv', ' customer_id = ? AND other_deliv_id = ?', array($customer_id,$other_deliv_id));81 $address = $objQuery->select('*', 'dtb_other_deliv', 'other_deliv_id = ?', array($other_deliv_id)); 79 82 return $address ? $address[0] : FALSE; 80 83 } … … 100 103 * お届け先の削除 101 104 * 102 * @param integer $customerId103 105 * @param integer $delivId 104 106 * @return void 105 107 */ 106 function delete Address($customer_id,$other_deliv_id) {107 $where = ' customer_id = ? ANDother_deliv_id = ?';108 function delete($other_deliv_id) { 109 $where = 'other_deliv_id = ?'; 108 110 $objQuery =& SC_Query_Ex::getSingletonInstance(); 109 $objQuery->delete('dtb_other_deliv', $where, array($ customer_id, $other_deliv_id));111 $objQuery->delete('dtb_other_deliv', $where, array($other_deliv_id)); 110 112 } 111 113 -
branches/version-2_12-dev/data/class/pages/mypage/LC_Page_Mypage_Delivery.php
r22065 r22069 85 85 } 86 86 87 $objAddress->delete Address($customer_id,$objFormParam->getValue('other_deliv_id'));87 $objAddress->delete($objFormParam->getValue('other_deliv_id')); 88 88 break; 89 89 -
branches/version-2_12-dev/data/class/pages/mypage/LC_Page_Mypage_DeliveryAddr.php
r22065 r22069 136 136 137 137 if ($_GET['other_deliv_id'] != '') { 138 $arrOtherDeliv = $objAddress->get Address($objCustomer->getValue('customer_id'),$_SESSION['other_deliv_id']);138 $arrOtherDeliv = $objAddress->get($_SESSION['other_deliv_id']); 139 139 140 140 //不正アクセス判定 … … 171 171 $sqlval = $objFormParam->getDbArray(); 172 172 173 $sqlval['other_deliv_id'] = $arrRet['other_deliv_id']; 173 174 $sqlval['customer_id'] = $customer_id; 174 175 175 $objAddress-> registAddress($customer_id, $sqlval, $arrRet['other_deliv_id']);176 $objAddress->save($sqlval); 176 177 } 177 178 -
branches/version-2_12-dev/data/class/pages/shopping/LC_Page_Shopping_Deliv.php
r22065 r22069 110 110 // 削除 111 111 case 'delete': 112 $objAddress->delete Address($objCustomer->getValue('customer_id'),$arrForm['other_deliv_id']);112 $objAddress->delete($arrForm['other_deliv_id']); 113 113 break; 114 114 … … 228 228 // 別のお届け先がチェックされている場合 229 229 else { 230 $arrOtherDeliv = $objAddress->get Address($objCustomer->getValue('customer_id'),$other_deliv_id);230 $arrOtherDeliv = $objAddress->get($other_deliv_id); 231 231 if (!$arrOtherDeliv) { 232 232 return false; -
branches/version-2_12-dev/data/class/pages/shopping/LC_Page_Shopping_Multiple.php
r22065 r22069 309 309 if ($objCustomer->isLoginSuccess(true)) { 310 310 if ($other_deliv_id != 0) { 311 $otherDeliv = $objAddress->get Address($objCustomer->getValue('customer_id'),$other_deliv_id);311 $otherDeliv = $objAddress->get($other_deliv_id); 312 312 foreach ($otherDeliv as $key => $val) { 313 313 $arrValues[$other_deliv_id]['shipping_' . $key] = $val;
Note: See TracChangeset
for help on using the changeset viewer.