Changeset 18457 for branches/comu-ver2
- Timestamp:
- 2010/01/01 16:54:21 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/comu-ver2/data/class/pages/shopping/LC_Page_Shopping_Complete.php
r18283 r18457 304 304 // 購入時会員登録 305 305 if(isset($arrData['member_check']) && $arrData['member_check'] == '1') { 306 // 仮会員登録307 $customer_id = $this->lfRegist PreCustomer($arrData, $this->arrInfo);306 // 会員登録 307 $customer_id = $this->lfRegistCustomer($arrData, $this->arrInfo); 308 308 // 購入集計を顧客テーブルに反映 309 309 $this->lfSetCustomerPurchase($customer_id, $arrData, $objQuery); … … 312 312 //有効 313 313 case '1': 314 // 仮会員登録315 $customer_id = $this->lfRegist PreCustomer($arrData, $this->arrInfo);314 // 会員登録 315 $customer_id = $this->lfRegistCustomer($arrData, $this->arrInfo); 316 316 // 購入集計を顧客テーブルに反映 317 317 $this->lfSetCustomerPurchase($customer_id, $arrData, $objQuery); … … 345 345 } 346 346 347 // 会員登録(仮登録) 348 function lfRegistPreCustomer($arrData, $arrInfo) { 347 // 会員登録 348 function lfRegistCustomer($arrData, $arrInfo) { 349 $objQuery = new SC_Query(); 350 351 //会員登録時に仮会員確認用のメールを送付するか 352 $confirm_flg = CUSTOMER_CONFIRM_MAIL; 353 349 354 // 購入時の会員登録 350 355 $sqlval['name01'] = $arrData['order_name01']; … … 369 374 $sqlval['reminder_answer'] = $arrData['reminder_answer']; 370 375 371 // メルマガ配信用フラグの判定 372 switch($arrData['mail_flag']) { 373 case '1': // HTMLメール 374 $mail_flag = 4; 375 break; 376 case '2': // TEXTメール 377 $mail_flag = 5; 378 break; 379 case '3': // 希望なし 380 $mail_flag = 6; 381 break; 382 default: 383 $mail_flag = 6; 384 break; 385 } 376 // 仮会員登録の場合 377 if ($confirm_flg == true) { 378 // 重複しない会員登録キーを発行する。 379 $count = 1; 380 while ($count != 0) { 381 $uniqid = SC_Utils_Ex::sfGetUniqRandomId("t"); 382 $count = $objQuery->count("dtb_customer", "secret_key = ?", array($uniqid)); 383 } 384 $sqlval["status"] = "1"; // 仮会員 385 //本会員登録 386 } else { 387 // 重複しない会員登録キーを発行する。 388 $count = 1; 389 while ($count != 0) { 390 $uniqid = SC_Utils_Ex::sfGetUniqRandomId("r"); 391 $count = $objQuery->count("dtb_customer", "secret_key = ?", array($uniqid)); 392 } 393 $sqlval["status"] = "2"; // 本会員 394 } 395 386 396 // メルマガフラグ 397 switch ($arrData["mailmaga_flg"]) { 398 case 1: // HTMLメール 399 $mail_flag = 4; 400 break; 401 case 2: // TEXTメール 402 $mail_flag = 5; 403 break; 404 default: 405 $mail_flag = 6; 406 break; 407 } 387 408 $sqlval['mailmaga_flg'] = $mail_flag; 388 409 389 // 会員仮登録390 $sqlval['status'] = 1;391 410 // URL判定用キー 392 411 $sqlval['secret_key'] = SC_Utils_Ex::sfGetUniqRandomId("t"); 393 412 394 $objQuery = new SC_Query();395 413 $sqlval['create_date'] = "now()"; 396 414 $sqlval['update_date'] = "now()"; … … 401 419 $customer_id = $arrRet[0]['customer_id']; 402 420 403 // 仮登録完了メール送信421 // 登録完了メール送信 404 422 $objMailPage = $this; 405 $objMailPage-> to_name01 = $arrData['order_name01'];406 $objMailPage-> to_name02 = $arrData['order_name02'];423 $objMailPage->name01 = $arrData['order_name01']; 424 $objMailPage->name02 = $arrData['order_name02']; 407 425 $objMailPage->CONF = $arrInfo; 408 426 $objMailPage->uniqid = $sqlval['secret_key']; … … 413 431 $mailHelper = new SC_Helper_Mail_Ex(); 414 432 433 //仮会員メール 434 if ($confirm_flg == true) { 435 $subject = $mailHelper->sfMakeSubject('会員登録のご確認'); 436 $body = $objMailView->fetch('mail_templates/customer_mail.tpl'); 437 //本会員メール 438 } else { 439 $subject = $mailHelper->sfMakeSubject('会員登録のご完了'); 440 $body = $objMailView->fetch('mail_templates/customer_regist_mail.tpl'); 441 // ログイン状態にする 442 $this->objCustomer->setLogin($arrData['order_email']); 443 } 444 415 445 $objMail = new SC_SendMail(); 416 446 $objMail->setItem( 417 447 '' // 宛先 418 , $ mailHelper->sfMakeSubject("会員登録のご確認")// サブジェクト448 , $subject // サブジェクト 419 449 , $body // 本文 420 450 , $arrInfo['email03'] // 配送元アドレス
Note: See TracChangeset
for help on using the changeset viewer.