Changeset 15622
- Timestamp:
- 2007/09/05 17:00:49 (16 years ago)
- Location:
- branches/feature-module-update
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/feature-module-update/data/class/helper/SC_Helper_Mail.php
r15618 r15622 45 45 // メール本文の取得 46 46 $objMailView->assignobj($objPage); 47 $body = $objMailView->fetch($ arrMAILTPLPATH[$template_id]);47 $body = $objMailView->fetch($this->arrMAILTPLPATH[$template_id]); 48 48 49 49 // メール送信処理 … … 59 59 /* 受注完了メール送信 */ 60 60 function sfSendOrderMail($order_id, $template_id, $subject = "", $header = "", $footer = "", $send = true) { 61 global $arrMAILTPLPATH;62 61 63 62 $objPage = new LC_Page(); … … 111 110 112 111 // 都道府県変換 113 $objPage->arrOrder['deliv_pref'] = $ arrPref[$objPage->arrOrder['deliv_pref']];112 $objPage->arrOrder['deliv_pref'] = $this->arrPref[$objPage->arrOrder['deliv_pref']]; 114 113 115 114 $objPage->arrOrderDetail = $arrOrderDetail; … … 121 120 // メール本文の取得 122 121 $objMailView->assignobj($objPage); 123 $body = $objMailView->fetch($ arrMAILTPLPATH[$template_id]);122 $body = $objMailView->fetch($this->arrMAILTPLPATH[$template_id]); 124 123 125 124 // メール送信処理 … … 129 128 $error = $arrInfo['email04']; 130 129 131 $tosubject = SC_Utils::sfMakeSubject($objQuery, $objMailView,130 $tosubject = $this->sfMakeSubject($objQuery, $objMailView, 132 131 $objPage, $tmp_subject); 133 132 … … 139 138 if($send) { 140 139 if ($objSendMail->sendMail()) { 141 $this-> fSaveMailHistory($order_id, $template_id, $tosubject, $body);140 $this->sfSaveMailHistory($order_id, $template_id, $tosubject, $body); 142 141 } 143 142 } -
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 -
branches/feature-module-update/data/class/pages/shopping/LC_Page_Shopping_Deliv.php
r15532 r15622 14 14 * @package Page 15 15 * @author LOCKON CO.,LTD. 16 * @version $Id $16 * @version $Id:LC_Page_Shopping_Deliv.php 15532 2007-08-31 14:39:46Z nanasess $ 17 17 */ 18 18 class LC_Page_Shopping_Deliv extends LC_Page { … … 71 71 // ユーザユニークIDの取得と購入状態の正当性をチェック 72 72 $uniqid = SC_Utils_Ex::sfCheckNormalAccess($objSiteSess, $objCartSess); 73 $objPage->tpl_uniqid = $uniqid; 73 $this->tpl_uniqid = $uniqid; 74 75 if (!isset($_POST['mode'])) $_POST['mode'] = ""; 74 76 75 77 // ログインチェック … … 82 84 case 'login': 83 85 $this->objLoginFormParam->toLower('login_email'); 84 $ objPage->arrErr = $this->objLoginFormParam->checkError();86 $this->arrErr = $this->objLoginFormParam->checkError(); 85 87 $arrForm = $this->objLoginFormParam->getHashArray(); 86 88 // クッキー保存判定 … … 91 93 } 92 94 93 if(count($ objPage->arrErr) == 0) {95 if(count($this->arrErr) == 0) { 94 96 // ログイン判定 95 97 if(!$objCustomer->getCustomerDataFromEmailPass($arrForm['login_pass'], $arrForm['login_email'])) { … … 157 159 $where = "order_temp_id = ?"; 158 160 $arrRet = $objQuery->select("*", "dtb_order_temp", $where, array($uniqid)); 161 if (empty($arrRet)) $arrRet = array(""); 159 162 $this->objFormParam->setParam($arrRet[0]); 160 163 break; … … 172 175 $objQuery->setorder("other_deliv_id DESC"); 173 176 $objOtherAddr = $objQuery->select($col, "dtb_other_deliv", $where, array($_SESSION['customer']['customer_id'])); 174 $ objPage->arrAddr = $arrCustomerAddr;175 $ objPage->tpl_addrmax = count($objOtherAddr);177 $this->arrAddr = $arrCustomerAddr; 178 $this->tpl_addrmax = count($objOtherAddr); 176 179 $cnt = 1; 177 180 foreach($objOtherAddr as $val) { 178 $ objPage->arrAddr[$cnt] = $val;181 $this->arrAddr[$cnt] = $val; 179 182 $cnt++; 180 183 } 181 184 182 185 // 入力値の取得 183 $objPage->arrForm = $this->objFormParam->getFormParamList(); 184 $objPage->arrErr = $arrErr; 185 186 $objView->assignobj($objPage); 186 if (!isset($arrErr)) $arrErr = array(); 187 $this->arrForm = $this->objFormParam->getFormParamList(); 188 $this->arrErr = $arrErr; 189 190 $objView->assignobj($this); 187 191 // フレームを選択(キャンペーンページから遷移なら変更) 188 192 $objCampaignSess->pageView($objView); -
branches/feature-module-update/data/class/pages/shopping/LC_Page_Shopping_Payment.php
r15613 r15622 249 249 250 250 if($sqlval['payment_id'] != "") { 251 list($sqlval['payment_method'], $sqlval['charge']) = lfGetPaymentInfo($sqlval['payment_id']);251 list($sqlval['payment_method'], $sqlval['charge']) = $this->lfGetPaymentInfo($sqlval['payment_id']); 252 252 } else { 253 253 $sqlval['payment_id'] = '0'; … … 256 256 257 257 if($sqlval['deliv_time_id'] != "") { 258 list($sqlval['deliv_id'], $sqlval['deliv_time']) = lfGetDelivTimeInfo($sqlval['deliv_time_id']);258 list($sqlval['deliv_id'], $sqlval['deliv_time']) = $this->lfGetDelivTimeInfo($sqlval['deliv_time_id']); 259 259 } else { 260 260 $sqlval['deliv_time_id'] = '0'; -
branches/feature-module-update/html/shopping/index.php
r15532 r15622 5 5 * http://www.lockon.co.jp/ 6 6 */ 7 8 7 // {{{ requires 9 8 require_once("../require.php");
Note: See TracChangeset
for help on using the changeset viewer.