- Timestamp:
- 2014/05/12 13:36:22 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_13_2/data/class/helper/SC_Helper_Address.php
r23279 r23408 40 40 { 41 41 if (self::delivErrorCheck($sqlval)) { 42 SC_Utils_Ex::sfDispSiteError(FREE_ERROR_MSG, '', false, "入力値が不正です。<br />正しい値を入力してください。"); 43 SC_Response_Ex::actionExit(); 42 return false; 44 43 } 45 44 … … 56 55 $deliv_count = $objQuery->count($from, $where, $arrVal); 57 56 if ($deliv_count >= DELIV_ADDR_MAX) { 58 SC_Utils_Ex::sfDispSiteError(FREE_ERROR_MSG, '', false, '別のお届け先最大登録数に達しています。'); 59 SC_Response_Ex::actionExit(); 57 return false; 60 58 } 61 59 62 60 // 別のお届け先を追加 63 61 $sqlval['other_deliv_id'] = $objQuery->nextVal('dtb_other_deliv_other_deliv_id'); 64 $ objQuery->insert($from, $sqlval);62 $ret = $objQuery->insert($from, $sqlval); 65 63 66 64 // 変更 … … 71 69 $deliv_count = $objQuery->count($from, $where, $arrVal); 72 70 if ($deliv_count != 1) { 73 SC_Utils_Ex::sfDispSiteError(FREE_ERROR_MSG, '', false, '一致する別のお届け先がありません。'); 74 SC_Response_Ex::actionExit(); 71 return false; 75 72 } 76 73 77 74 // 別のお届け先を変更 78 $ objQuery->update($from, $sqlval, $where, $arrVal);75 $ret = $objQuery->update($from, $sqlval, $where, $arrVal); 79 76 } 77 78 return $ret; 80 79 } 81 80 … … 86 85 * @return array() 87 86 */ 88 public function getAddress($other_deliv_id )87 public function getAddress($other_deliv_id, $customer_id = '') 89 88 { 90 $objCustomer = new SC_Customer_Ex();91 $customer_id = $objCustomer->getValue('customer_id');92 93 89 if (self::delivErrorCheck(array('customer_id' => $customer_id, 'other_deliv_id' => $other_deliv_id))) { 94 SC_Utils_Ex::sfDispSiteError(FREE_ERROR_MSG, '', false, "入力値が不正です。<br />正しい値を入力してください。"); 95 SC_Response_Ex::actionExit(); 90 return false; 96 91 } 97 92 … … 117 112 { 118 113 if (self::delivErrorCheck(array('customer_id' => $customer_id))) { 119 SC_Utils_Ex::sfDispSiteError(FREE_ERROR_MSG, '', false, "入力値が不正です。<br />正しい値を入力してください。"); 120 SC_Response_Ex::actionExit(); 114 return false; 121 115 } 122 116 … … 141 135 * @return void 142 136 */ 143 public function deleteAddress($other_deliv_id )137 public function deleteAddress($other_deliv_id, $customer_id = '') 144 138 { 145 $objCustomer = new SC_Customer_Ex();146 $customer_id = $objCustomer->getValue('customer_id');147 148 139 if (self::delivErrorCheck(array('customer_id' => $customer_id, 'other_deliv_id' => $other_deliv_id))) { 149 SC_Utils_Ex::sfDispSiteError(FREE_ERROR_MSG, '', false, "入力値が不正です。<br />正しい値を入力してください。"); 150 SC_Response_Ex::actionExit(); 140 return false; 151 141 } 152 142 … … 156 146 $where = 'customer_id = ? AND other_deliv_id = ?'; 157 147 $arrVal = array($customer_id, $other_deliv_id); 158 $objQuery->delete($from, $where, $arrVal);148 return $objQuery->delete($from, $where, $arrVal); 159 149 } 160 150
Note: See TracChangeset
for help on using the changeset viewer.