Ejemplo n.º 1
0
 /**
  * Page のプロセス.
  *
  * @return void
  */
 public function action()
 {
     //決済処理中ステータスのロールバック
     /* @var $objPurchase PurchaseHelper */
     $objPurchase = Application::alias('eccube.helper.purchase');
     $objPurchase->cancelPendingOrder(PENDING_ORDER_CANCEL_FLAG);
     /* @var $objSiteSess SiteSession */
     $objSiteSess = Application::alias('eccube.site_session');
     /* @var $objCartSess CartSession */
     $objCartSess = Application::alias('eccube.cart_session');
     /* @var $objCustomer Customer */
     $objCustomer = Application::alias('eccube.customer');
     /* @var $objFormParam FormParam */
     $objFormParam = Application::alias('eccube.form_param');
     /* @var $objAddress AddressHelper */
     $objAddress = Application::alias('eccube.helper.address');
     // 複数配送先指定が無効な場合はエラー
     if (USE_MULTIPLE_SHIPPING === false) {
         Utils::sfDispSiteError(PAGE_ERROR, '', true);
         Application::alias('eccube.response')->actionExit();
     }
     $this->tpl_uniqid = $objSiteSess->getUniqId();
     $this->arrAddress = $this->getDelivAddress($objCustomer, $objPurchase, $objAddress);
     $this->tpl_addrmax = count($this->arrAddress) - 2;
     // 「選択してください」と会員の住所をカウントしない
     $objPurchase->verifyChangeCart($this->tpl_uniqid, $objCartSess);
     $this->arrCartItem = $objCartSess->getCartList($objCartSess->getKey());
     $this->lfInitParam($objFormParam, $this->arrCartItem);
     $objFormParam->setParam($_POST);
     $objFormParam->convParam();
     switch ($this->getMode()) {
         case 'confirm':
             $objFormParam->setParam($_POST);
             $this->arrErr = $this->lfCheckError($objFormParam, $this->arrCartItem);
             if (Utils::isBlank($this->arrErr)) {
                 // フォームの情報を一時保存しておく
                 $_SESSION['multiple_temp'] = $objFormParam->getHashArray();
                 $this->saveMultipleShippings($this->tpl_uniqid, $objFormParam, $objCustomer, $objPurchase, $objAddress);
                 $objSiteSess->setRegistFlag();
                 Application::alias('eccube.response')->sendRedirect('confirm.php');
                 Application::alias('eccube.response')->actionExit();
             }
             break;
             // 前のページに戻る
         // 前のページに戻る
         case 'return':
             $objSiteSess->setRegistFlag();
             // 確認ページへ移動
             Response::sendRedirect('confirm.php');
             Response::actionExit();
             break;
         default:
             break;
     }
     $this->arrForm = $objFormParam->getFormParamList();
 }