Source for file LC_Page_Cart.php
Documentation is available at LC_Page_Cart.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");
if (file_exists(MODULE_PATH .
"mdl_gmopg/inc/function.php")) {
require_once(MODULE_PATH .
"mdl_gmopg/inc/function.php");
* @author LOCKON CO.,LTD.
* @version $Id:LC_Page_Cart.php 15532 2007-08-31 14:39:46Z nanasess $
$objSiteInfo =
$objView->objSiteInfo;
$arrInfo =
$objSiteInfo->data;
if($objCartSess->getCancelPurchase()) {
$this->tpl_message =
"商品購入中にカート内容が変更されましたので、お手数ですが購入手続きをやり直して下さい。";
if (!isset
($_POST['mode'])) $_POST['mode'] =
"";
$objCartSess->upQuantity($_POST['cart_no']);
$this->reload(); // PRG pattern
$objCartSess->downQuantity($_POST['cart_no']);
$this->reload(); // PRG pattern
$objCartSess->delProduct($_POST['cart_no']);
$this->reload(); // PRG pattern
$arrRet =
$objCartSess->getCartList();
for ($i =
0; $i <
$max; $i++
) {
$this->arrData =
$db->sfGetProductsClass($arrRet[$i]['id']);
$objSiteSess->setRegistFlag();
$pre_uniqid =
$objSiteSess->getUniqId();
$objSiteSess->setUniqId();
$uniqid =
$objSiteSess->getUniqId();
// エラーリトライなどで既にuniqidが存在する場合は、設定を引き継ぐ
$sqlval['order_temp_id'] =
$uniqid;
$where =
"order_temp_id = ?";
$objQuery->update("dtb_order_temp", $sqlval, $where, array($pre_uniqid));
$objCartSess->saveCurrentCart($uniqid);
$db->sfTotalCart($this, $objCartSess, $arrInfo);
$this->arrData =
$db->sfTotalConfirm($this->arrData, $this, $objCartSess, $arrInfo, $objCustomer);
$this->arrInfo =
$arrInfo;
if($objCustomer->isLoginSuccess()) {
$this->tpl_user_point =
$objCustomer->getValue('point');
$this->tpl_name =
$objCustomer->getValue('name01');
$this->tpl_deliv_free =
$this->arrInfo['free_rule'] -
$this->tpl_total_pretax;
$this->tpl_prev_url =
$objCartSess->getPrevURL();
$objView->assignobj($this);
// フレームを選択(キャンペーンページから遷移なら変更)
$objCampaignSess->pageView($objView);
if ($_REQUEST['mode'] ==
'continue') {
$objSiteInfo =
$objView->objSiteInfo;
$arrInfo =
$objSiteInfo->data;
if($objCartSess->getCancelPurchase()) {
$this->tpl_message =
"商品購入中にカート内容が変更されましたので、お手数ですが購入手続きをやり直して下さい。";
$arrRet =
$objCartSess->getCartList();
for ($i =
0; $i <
$max; $i++
) {
$arrData =
$objDb->sfGetProductsClass($arrRet[$i]['id']);
$objSiteSess->setRegistFlag();
$pre_uniqid =
$objSiteSess->getUniqId();
$objSiteSess->setUniqId();
$uniqid =
$objSiteSess->getUniqId();
// エラーリトライなどで既にuniqidが存在する場合は、設定を引き継ぐ
$sqlval['order_temp_id'] =
$uniqid;
$where =
"order_temp_id = ?";
$objQuery->update("dtb_order_temp", $sqlval, $where, array($pre_uniqid));
$objCartSess->saveCurrentCart($uniqid);
if (!isset
($_GET['mode'])) $_GET['mode'] =
"";
* FIXME sendRedirect() を使った方が良いが無限ループしてしまう...
$objCartSess->upQuantity($_GET['cart_no']);
$objCartSess->downQuantity($_GET['cart_no']);
$objCartSess->delProduct($_GET['cart_no']);
$objDb->sfTotalCart($this, $objCartSess, $arrInfo);
$this->arrData =
$objDb->sfTotalConfirm($arrData, $this, $objCartSess, $arrInfo, $objCustomer);
$this->arrInfo =
$arrInfo;
if($objCustomer->isLoginSuccess(true)) {
$this->tpl_user_point =
$objCustomer->getValue('point');
$this->tpl_name =
$objCustomer->getValue('name01');
$tpl_deliv_free =
$this->arrInfo['free_rule'] -
$this->tpl_total_pretax;
$this->tpl_deliv_free =
$tpl_deliv_free;
$this->tpl_prev_url =
$objCartSess->getPrevURL();
$objView->assignobj($this);
$objView->display(SITE_FRAME);
Documentation generated on Tue, 28 Apr 2009 18:12:02 +0900 by phpDocumentor 1.4.2