Changeset 15622 for branches/feature-module-update/data/class/pages/shopping/LC_Page_Shopping_Complete.php
- Timestamp:
- 2007/09/05 17:00:49 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/feature-module-update/data/class/pages/shopping/LC_Page_Shopping_Complete.php
r15532 r15622 14 14 * @package Page 15 15 * @author LOCKON CO.,LTD. 16 * @version $Id $16 * @version $Id:LC_Page_Shopping_Complete.php 15532 2007-08-31 14:39:46Z nanasess $ 17 17 */ 18 18 class LC_Page_Shopping_Complete extends LC_Page { … … 32 32 $this->tpl_title = "ご注文完了"; 33 33 34 // TODO 35 $this->arrCONVENIENCE = $arrCONVENIENCE; 36 $this->arrCONVENIMESSAGE = $arrCONVENIMESSAGE; 37 $objPage->arrCONVENIENCE = $arrCONVENIENCE; 38 $objPage->arrCONVENIMESSAGE = $arrCONVENIMESSAGE; 34 $masterData = new SC_DB_MasterData_Ex(); 35 $this->arrCONVENIENCE = $masterData->getMasterData("mtb_convenience"); 36 $this->arrCONVENIMESSAGE = $masterData->getMasterData("mtb_conveni_message"); 39 37 40 38 $this->allowClientCache(); … … 55 53 $this->arrInfo = $objSiteInfo->data; 56 54 $this->objCustomer = new SC_Customer(); 55 $mailHelper = new SC_Helper_Mail_Ex(); 57 56 58 57 // 前のページで正しく登録手続きが行われたか判定 59 SC_Utils_Ex::sfIsPrePage($ objSiteSess);58 SC_Utils_Ex::sfIsPrePage($this->objSiteSess); 60 59 // ユーザユニークIDの取得と購入状態の正当性をチェック 61 $uniqid = SC_Utils_Ex::sfCheckNormalAccess($ objSiteSess, $objCartSess);60 $uniqid = SC_Utils_Ex::sfCheckNormalAccess($this->objSiteSess, $this->objCartSess); 62 61 if ($uniqid != "") { 63 62 … … 65 64 $objQuery = new SC_Query(); 66 65 $objQuery->begin(); 67 $order_id = lfDoComplete($objQuery, $uniqid);66 $order_id = $this->lfDoComplete($objQuery, $uniqid); 68 67 $objQuery->commit(); 69 68 70 69 // セッションに保管されている情報を更新する 71 $ objCustomer->updateSession();70 $this->objCustomer->updateSession(); 72 71 73 72 // 完了メール送信 74 73 if($order_id != "") { 75 SC_Utils_Ex::sfSendOrderMail($order_id, '1');74 $mailHelper->sfSendOrderMail($order_id, '1'); 76 75 } 77 76 … … 109 108 } 110 109 111 $this->arrInfo = $arrInfo;112 110 // キャンペーンからの遷移かチェック 113 $this->is_campaign = $ objCampaignSess->getIsCampaign();114 $this->campaign_dir = $ objCampaignSess->getCampaignDir();111 $this->is_campaign = $this->objCampaignSess->getIsCampaign(); 112 $this->campaign_dir = $this->objCampaignSess->getCampaignDir(); 115 113 116 114 $objView->assignobj($this); 117 115 // フレームを選択(キャンペーンページから遷移なら変更) 118 $ objCampaignSess->pageView($objView);116 $this->objCampaignSess->pageView($objView); 119 117 120 118 // セッション開放 121 $ objCampaignSess->delCampaign();119 $this->objCampaignSess->delCampaign(); 122 120 } 123 121 … … 179 177 180 178 // 完了処理 181 function lfDoComplete( $objQuery, $uniqid) {179 function lfDoComplete(&$objQuery, $uniqid) { 182 180 $objDb = new SC_Helper_DB_Ex(); 183 181 … … 186 184 187 185 // 会員情報登録処理 188 if ($ objCustomer->isLoginSuccess()) {186 if ($this->objCustomer->isLoginSuccess()) { 189 187 // 新お届け先の登録 190 $this->lfSetNewAddr($uniqid, $ objCustomer->getValue('customer_id'));188 $this->lfSetNewAddr($uniqid, $this->objCustomer->getValue('customer_id')); 191 189 // 購入集計を顧客テーブルに反映 192 $this->lfSetCustomerPurchase($ objCustomer->getValue('customer_id'), $arrData, $objQuery);190 $this->lfSetCustomerPurchase($this->objCustomer->getValue('customer_id'), $arrData, $objQuery); 193 191 } else { 194 192 //購入時強制会員登録 … … 199 197 if($arrData['member_check'] == '1') { 200 198 // 仮会員登録 201 $customer_id = $this->lfRegistPreCustomer($arrData, $ arrInfo);199 $customer_id = $this->lfRegistPreCustomer($arrData, $this->arrInfo); 202 200 // 購入集計を顧客テーブルに反映 203 201 $this->lfSetCustomerPurchase($customer_id, $arrData, $objQuery); … … 207 205 case '1': 208 206 // 仮会員登録 209 $customer_id = $this->lfRegistPreCustomer($arrData, $ arrInfo);207 $customer_id = $this->lfRegistPreCustomer($arrData, $this->arrInfo); 210 208 // 購入集計を顧客テーブルに反映 211 209 $this->lfSetCustomerPurchase($customer_id, $arrData, $objQuery); … … 215 213 } 216 214 // 一時テーブルを受注テーブルに格納する 217 $order_id = $this->lfRegistOrder($objQuery, $arrData, $ objCampaignSess);215 $order_id = $this->lfRegistOrder($objQuery, $arrData, $this->objCampaignSess); 218 216 // カート商品を受注詳細テーブルに格納する 219 $this->lfRegistOrderDetail($objQuery, $order_id, $ objCartSess);217 $this->lfRegistOrderDetail($objQuery, $order_id, $this->objCartSess); 220 218 // 受注一時テーブルの情報を削除する。 221 219 $this->lfDeleteTempOrder($objQuery, $uniqid); 222 220 // キャンペーンからの遷移の場合登録する。 223 if($ objCampaignSess->getIsCampaign() and $objCartSess->chkCampaign($objCampaignSess->getCampaignId())) {221 if($this->objCampaignSess->getIsCampaign() and $this->objCartSess->chkCampaign($this->objCampaignSess->getCampaignId())) { 224 222 $this->lfRegistCampaignOrder($objQuery, $objCampaignSess, $order_id); 225 223 } 226 224 227 225 // セッションカート内の商品を削除する。 228 $ objCartSess->delAllProducts();226 $this->objCartSess->delAllProducts(); 229 227 // 注文一時IDを解除する。 230 $ objSiteSess->unsetUniqId();228 $this->objSiteSess->unsetUniqId(); 231 229 232 230 return $order_id; … … 299 297 $body = $objMailView->fetch("mail_templates/customer_mail.tpl"); 300 298 299 $mailHelper = new SC_Helper_Mail_Ex(); 300 301 301 $objMail = new GC_SendMail(); 302 302 $objMail->setItem( 303 303 '' // 宛先 304 , sfMakeSubject("会員登録のご確認") // サブジェクト304 , $mailHelper->sfMakeSubject("会員登録のご確認") // サブジェクト 305 305 , $body // 本文 306 306 , $arrInfo['email03'] // 配送元アドレス … … 371 371 372 372 // 受注詳細テーブルへ登録 373 function lfRegistOrderDetail( $objQuery, $order_id,$objCartSess) {373 function lfRegistOrderDetail(&$objQuery, $order_id, &$objCartSess) { 374 374 $objDb = new SC_Helper_DB_Ex(); 375 375 // カート内情報の取得 … … 412 412 413 413 // キャンペーン受注テーブルへ登録 414 function lfRegistCampaignOrder( $objQuery,$objCampaignSess, $order_id) {414 function lfRegistCampaignOrder(&$objQuery, &$objCampaignSess, $order_id) { 415 415 416 416 // 受注データを取得 … … 440 440 441 441 /* 受注一時テーブルの削除 */ 442 function lfDeleteTempOrder( $objQuery, $uniqid) {442 function lfDeleteTempOrder(&$objQuery, $uniqid) { 443 443 $where = "order_temp_id = ?"; 444 444 $sqlval['del_flg'] = 1; … … 496 496 497 497 /* 購入情報を会員テーブルに登録する */ 498 function lfSetCustomerPurchase($customer_id, $arrData, $objQuery) {498 function lfSetCustomerPurchase($customer_id, $arrData, &$objQuery) { 499 499 $col = "first_buy_date, last_buy_date, buy_times, buy_total, point"; 500 500 $where = "customer_id = ?"; … … 520 520 521 521 // 在庫を減らす処理 522 function lfReduceStock( $objQuery, $arrID, $quantity) {522 function lfReduceStock(&$objQuery, $arrID, $quantity) { 523 523 $where = "product_id = ? AND classcategory_id1 = ? AND classcategory_id2 = ?"; 524 524 $arrRet = $objQuery->select("stock, stock_unlimited", "dtb_products_class", $where, $arrID); … … 544 544 // GETの値をインサート用に整える 545 545 function lfGetInsParam($sqlVal){ 546 546 $objDb = new SC_Helper_DB_Ex(); 547 547 foreach($_GET as $key => $val){ 548 548 // カラムの存在チェック 549 if( sfColumnExists("dtb_order", $key)) $sqlVal[$key] = $val;549 if($objDb->sfColumnExists("dtb_order", $key)) $sqlVal[$key] = $val; 550 550 } 551 551
Note: See TracChangeset
for help on using the changeset viewer.