Source for file LC_Page_Shopping_Confirm.php
Documentation is available at LC_Page_Shopping_Confirm.php
* This file is part of EC-CUBE
* Copyright(c) 2000-2007 LOCKON CO.,LTD. All Rights Reserved.
* http://www.lockon.co.jp/
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
require_once(CLASS_PATH .
"pages/LC_Page.php");
* @author LOCKON CO.,LTD.
* @version $Id:LC_Page_Shopping_Confirm.php 15532 2007-08-31 14:39:46Z nanasess $
$this->tpl_css =
URL_DIR.
'css/layout/shopping/confirm.css';
$this->arrPref =
$masterData->getMasterData("mtb_pref", array("pref_id", "pref_name", "rank"));
$this->arrSex =
$masterData->getMasterData("mtb_sex");
$this->arrMAILMAGATYPE =
$masterData->getMasterData("mtb_mail_magazine_type");
$this->arrReminder =
$masterData->getMasterData("mtb_reminder");
$objSiteInfo =
$objView->objSiteInfo;
$arrInfo =
$objSiteInfo->data;
// 前のページで正しく登録手続きが行われた記録があるか判定
// ユーザユニークIDの取得と購入状態の正当性をチェック
$uniqid =
SC_Utils_Ex::sfCheckNormalAccess($objSiteSess, $objCartSess);
$this->tpl_uniqid =
$uniqid;
$objDb->sfTotalCart($this, $objCartSess, $arrInfo);
$arrData =
$objDb->sfGetOrderTemp($uniqid);
$arrData =
$objDb->sfTotalConfirm($arrData, $this, $objCartSess, $arrInfo, $objCustomer, $objCampaignSess);
// キャンペーンからの遷移で送料が無料だった場合の処理
if($objCampaignSess->getIsCampaign()) {
$deliv_free_flg =
$objQuery->get("dtb_campaign", "deliv_free_flg", "campaign_id = ?", array($objCampaignSess->getCampaignId()));
$arrData['payment_total'] -=
$arrData['deliv_fee'];
$arrData['deliv_fee'] =
0;
$objCartSess->chkSoldOut($objCartSess->getCartList());
if($objCustomer->isLoginSuccess()) {
$this->tpl_user_point =
$objCustomer->getValue('point');
if($objDb->sfColumnExists("dtb_payment", "memo01")){
// MEMO03に値が入っている場合には、モジュール追加されたものとみなす
$sql =
"SELECT memo03 FROM dtb_payment WHERE payment_id = ?";
$arrPayment =
$objQuery->getall($sql, array($arrData['payment_id']));
$payment_type =
$arrPayment[0]["memo03"];
$this->payment_type =
$payment_type;
if (!isset
($_POST['mode'])) $_POST['mode'] =
"";
$objSiteSess->setRegistFlag();
// この時点でオーダーIDを確保しておく(クレジット、コンビニ決済で必要なため)
// postgresqlとmysqlとで処理を分ける
if (DB_TYPE ==
"pgsql") {
$order_id =
$objQuery->nextval("dtb_order","order_id");
}elseif (DB_TYPE ==
"mysql") {
$order_id =
$objQuery->get_auto_increment("dtb_order");
$arrData["order_id"] =
$order_id;
$objDb->sfRegistTempOrder($uniqid, $arrData);
$objSiteSess->setRegistFlag();
if($payment_type !=
"") {
// TODO 決済方法のモジュールは Plugin として実装したい
$_SESSION["payment_id"] =
$arrData['payment_id'];
$this->arrData =
$arrData;
$this->arrInfo =
$arrInfo;
$objView->assignobj($this);
// フレームを選択(キャンペーンページから遷移なら変更)
$objCampaignSess->pageView($objView);
$objSiteInfo =
$objView->objSiteInfo;
$arrInfo =
$objSiteInfo->data;
// 前のページで正しく登録手続きが行われた記録があるか判定
// ユーザユニークIDの取得と購入状態の正当性をチェック
$uniqid =
SC_Utils_Ex::sfCheckNormalAccess($objSiteSess, $objCartSess);
$this->tpl_uniqid =
$uniqid;
$objDb->sfTotalCart($this, $objCartSess, $arrInfo);
$arrData =
$objDb->sfGetOrderTemp($uniqid);
$arrData =
$objDb->sfTotalConfirm($arrData, $this, $objCartSess, $arrInfo, $objCustomer);
$objCartSess->chkSoldOut($objCartSess->getCartList());
if($objCustomer->isLoginSuccess(true)) {
$this->tpl_user_point =
$objCustomer->getValue('point');
if($objDb->sfColumnExists("dtb_payment", "memo01")){
// MEMO03に値が入っている場合には、モジュール追加されたものとみなす
$sql =
"SELECT memo03 FROM dtb_payment WHERE payment_id = ?";
$arrPayment =
$objQuery->getall($sql, array($arrData['payment_id']));
$payment_type =
$arrPayment[0]["memo03"];
$this->payment_type =
$payment_type;
if (!isset
($_POST['mode'])) $_POST['mode'] =
"";
$objSiteSess->setRegistFlag();
// この時点でオーダーIDを確保しておく(クレジット、コンビニ決済で必要なため)
// postgresqlとmysqlとで処理を分ける
if (DB_TYPE ==
"pgsql") {
$order_id =
$objQuery->nextval("dtb_order","order_id");
}elseif (DB_TYPE ==
"mysql") {
$order_id =
$objQuery->get_auto_increment("dtb_order");
$arrData["order_id"] =
$order_id;
$objDb->sfRegistTempOrder($uniqid, $arrData);
$objSiteSess->setRegistFlag();
if($payment_type !=
"") {
$_SESSION["payment_id"] =
$arrData['payment_id'];
$this->arrData =
$arrData;
$this->arrInfo =
$arrInfo;
$objView->assignobj($this);
$objView->display(SITE_FRAME);
Documentation generated on Tue, 28 Apr 2009 18:12:54 +0900 by phpDocumentor 1.4.2