Ignore:
Timestamp:
2011/01/10 13:59:23 (12 years ago)
Author:
nanasess
bzr:base-revision:
svn-v4:1e3b908f-19a9-db11-a64c-001125224ba8:branches/version-2_5-dev:19859
bzr:committer:
Kentaro Ohkouchi <nanasess@fsm.ne.jp>
bzr:file-ids:

data/Smarty/templates/default/shopping/deliv.tpl 15732@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2FSmarty%2Ftemplates%2Fdefault%2Fshopping%2Fdeliv.tpl
data/Smarty/templates/default/shopping/multiple.tpl multiple.tpl-20110109122547-u3fq5xmi1b4jn5n4-1
data/Smarty/templates/default/shopping/nonmember_input.tpl 15732@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2FSmarty%2Ftemplates%2Fdefault%2Fshopping%2Fnonmember_input.tpl
data/Smarty/templates/default/shopping/payment.tpl 15732@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2FSmarty%2Ftemplates%2Fdefault%2Fshopping%2Fpayment.tpl
data/class/SC_CartSession.php 15078@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2FSC_CartSession.php
data/class/SC_Customer.php 15078@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2FSC_Customer.php
data/class/helper/SC_Helper_DB.php 15176@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Fhelper%2FSC_Helper_DB.php
data/class/helper/SC_Helper_Purchase.php sc_helper_purchase.p-20101020100530-jyaoa7ch9pdfjqzp-1
data/class/pages/error/LC_Page_Error.php 15141@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Fpages%2Ferror%2FLC_Page_Error.php
data/class/pages/mypage/LC_Page_Mypage_DeliveryAddr.php 16093@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Fpages%2Fmypage%2FLC_Page_Mypage_DeliveryAddr.php
data/class/pages/shopping/LC_Page_Shopping.php 15223@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Fpages%2Fshopping%2FLC_Page_Shopping.php
data/class/pages/shopping/LC_Page_Shopping_Confirm.php 15223@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Fpages%2Fshopping%2FLC_Page_Shopping_Confirm.php
data/class/pages/shopping/LC_Page_Shopping_Deliv.php 15223@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Fpages%2Fshopping%2FLC_Page_Shopping_Deliv.php
data/class/pages/shopping/LC_Page_Shopping_Multiple.php lc_page_shopping_mul-20110109122547-u3fq5xmi1b4jn5n4-2
data/class/pages/shopping/LC_Page_Shopping_Payment.php 15223@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Fpages%2Fshopping%2FLC_Page_Shopping_Payment.php
data/class/util/SC_Utils.php 15078@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Futil%2FSC_Utils.php
data/class_extends/page_extends/shopping/LC_Page_Shopping_Multiple_Ex.php lc_page_shopping_mul-20110109122547-u3fq5xmi1b4jn5n4-3
data/install.php 15078@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Finstall.php
html/install/sql/create_table_mysql.sql 15078@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fhtml%2Finstall%2Fsql%2Fcreate_table_mysql.sql
html/install/sql/create_table_pgsql.sql 15078@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fhtml%2Finstall%2Fsql%2Fcreate_table_pgsql.sql
html/install/sql/drop_table.sql 15078@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fhtml%2Finstall%2Fsql%2Fdrop_table.sql
html/install/sql/insert_data.sql 15078@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fhtml%2Finstall%2Fsql%2Finsert_data.sql
html/js/site.js site.js-20101208110316-7ungq6kj49bhw4d1-7
html/shopping/multiple.php multiple.php-20110109122547-u3fq5xmi1b4jn5n4-4
html/user_data/packages/default/css/under02.css 16708@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fhtml%2Fuser_data%2Fpackages%2Fdefault%2Fcss%2Funder02.css
bzr:mapping-version:
v4
bzr:merge:

nanasess@fsm.ne.jp-20110110045555-wppbrefvyq7ccz18
bzr:repository-uuid:
1e3b908f-19a9-db11-a64c-001125224ba8
bzr:revision-id:
nanasess@fsm.ne.jp-20110110045915-6b02oxleldtyw7ee
bzr:revno:
2589
bzr:revprop:branch-nick:
branches/version-2_5-dev
bzr:root:
branches/version-2_5-dev
bzr:text-revisions:

data/Smarty/templates/default/shopping/deliv.tpl nanasess@fsm.ne.jp-20110109122851-7ox5o3sn0yp5rjpn
data/Smarty/templates/default/shopping/multiple.tpl nanasess@fsm.ne.jp-20110109122851-7ox5o3sn0yp5rjpn
data/Smarty/templates/default/shopping/nonmember_input.tpl nanasess@fsm.ne.jp-20110110045555-wppbrefvyq7ccz18
data/Smarty/templates/default/shopping/payment.tpl nanasess@fsm.ne.jp-20110110045555-wppbrefvyq7ccz18
data/class/SC_CartSession.php nanasess@fsm.ne.jp-20110110045555-wppbrefvyq7ccz18
data/class/SC_Customer.php nanasess@fsm.ne.jp-20110109122851-7ox5o3sn0yp5rjpn
data/class/helper/SC_Helper_DB.php nanasess@fsm.ne.jp-20110110045555-wppbrefvyq7ccz18
data/class/helper/SC_Helper_Purchase.php nanasess@fsm.ne.jp-20110110045555-wppbrefvyq7ccz18
data/class/pages/error/LC_Page_Error.php nanasess@fsm.ne.jp-20110110045555-wppbrefvyq7ccz18
data/class/pages/mypage/LC_Page_Mypage_DeliveryAddr.php nanasess@fsm.ne.jp-20110109122851-7ox5o3sn0yp5rjpn
data/class/pages/shopping/LC_Page_Shopping.php nanasess@fsm.ne.jp-20110110045555-wppbrefvyq7ccz18
data/class/pages/shopping/LC_Page_Shopping_Confirm.php nanasess@fsm.ne.jp-20110110045555-wppbrefvyq7ccz18
data/class/pages/shopping/LC_Page_Shopping_Deliv.php nanasess@fsm.ne.jp-20110110045555-wppbrefvyq7ccz18
data/class/pages/shopping/LC_Page_Shopping_Multiple.php nanasess@fsm.ne.jp-20110109122851-7ox5o3sn0yp5rjpn
data/class/pages/shopping/LC_Page_Shopping_Payment.php nanasess@fsm.ne.jp-20110110045555-wppbrefvyq7ccz18
data/class/util/SC_Utils.php nanasess@fsm.ne.jp-20110110045555-wppbrefvyq7ccz18
data/class_extends/page_extends/shopping/LC_Page_Shopping_Multiple_Ex.php nanasess@fsm.ne.jp-20110109122604-8059rgcurt250q06
html/install/sql/create_table_mysql.sql nanasess@fsm.ne.jp-20110109121902-2oqes35heyjm5nlc
html/install/sql/create_table_pgsql.sql nanasess@fsm.ne.jp-20110109121902-2oqes35heyjm5nlc
html/install/sql/drop_table.sql nanasess@fsm.ne.jp-20110109121902-2oqes35heyjm5nlc
html/install/sql/insert_data.sql nanasess@fsm.ne.jp-20110109122604-8059rgcurt250q06
html/js/site.js nanasess@fsm.ne.jp-20110110045555-wppbrefvyq7ccz18
html/shopping/multiple.php nanasess@fsm.ne.jp-20110109122604-8059rgcurt250q06
html/user_data/packages/default/css/under02.css nanasess@fsm.ne.jp-20110110045555-wppbrefvyq7ccz18
bzr:timestamp:
2011-01-10 13:59:15.388999939 +0900
bzr:user-agent:
bzr2.2.2+bzr-svn1.0.4
svn:original-date:
2011-01-10T04:59:15.389000Z
Message:

#843(複数配送先の指定)

  • とりあえず通常配送が通るように修正
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_5-dev/data/class/pages/shopping/LC_Page_Shopping_Payment.php

    r19833 r19860  
    7676        $objCartSess = new SC_CartSession(); 
    7777        $objDb = new SC_Helper_DB_Ex(); 
     78        $objPurchase = new SC_Helper_Purchase_Ex(); 
    7879        $this->objCustomer = new SC_Customer(); 
    7980 
     
    8586        $this->objFormParam->setParam($_POST); 
    8687 
    87         // ユーザユニークIDの取得と購入状態の正当性をチェック 
    88         $uniqid = SC_Utils_Ex::sfCheckNormalAccess($objSiteSess, $objCartSess); 
     88        $uniqid = $objSiteSess->getUniqId(); 
     89        $objPurchase->verifyChangeCart($uniqid, $objCartSess); 
     90 
    8991        // ユニークIDを引き継ぐ 
    9092        $this->tpl_uniqid = $uniqid; 
    9193 
    92         //ダウンロード商品判定 
    93         $this->cartdown = $objDb->chkCartDown($objCartSess); 
     94        $this->cartKey = $objCartSess->getKey(); 
    9495 
    9596        // 会員ログインチェック 
     
    9899            $this->tpl_user_point = $this->objCustomer->getValue('point'); 
    99100            //戻り先URL 
    100             if ($this->cartdown == 2) { 
     101            if ($this->cartKey == PRODUCT_TYPE_DOWNLOAD) { 
    101102                // ダウンロード商品のみの場合はカート画面へ戻る 
    102103                $this->tpl_back_url = CART_URL_PATH; 
     
    109110 
    110111        // 一時受注テーブルの読込 
    111         $arrOrderTemp = $objDb->sfGetOrderTemp($uniqid); 
     112        $arrOrderTemp = $objPurchase->getOrderTemp($uniqid); 
    112113        //不正遷移チェック(正常に受注情報が格納されていない場合は一旦カート画面まで戻す) 
    113114        if (!$arrOrderTemp) { 
    114             $this->objDisplay->redirect($this->getLocation(CART_URL_PATH)); 
     115            SC_Response_Ex::sendRedirect(CART_URL_PATH); 
    115116            exit; 
    116117        } 
    117118 
    118119        // カート内商品の集計処理を行う 
    119         $this->cartKey = $_SESSION['cartKey']; 
    120120        $this->cartItems = $objCartSess->getCartList($this->cartKey); 
    121121        $this->tpl_message = $objCartSess->checkProducts($this->cartKey); 
     
    131131 
    132132        // 支払い方法の取得 
    133         $this->arrPayment = $this->lfGetPayment($total_inctax, $this->cartKey, 
    134                                                 $objCartSess->getAllProductClassID($this->cartKey)); 
     133        $this->arrPayment = $objPurchase->getPayment($total_inctax, $objCartSess->getAllProductClassID($this->cartKey)); 
    135134 
    136135        if (!isset($_POST['mode'])) $_POST['mode'] = ""; 
     
    140139            // 入力値の変換 
    141140            $this->objFormParam->convParam(); 
    142             $this->arrErr = $this->lfCheckError($this->arrData); 
     141            $this->arrErr = $this->lfCheckError($this->arrData, $this->arrPayment); 
    143142            // 入力エラーなし 
    144143            if(count($this->arrErr) == 0) { 
     
    165164            exit; 
    166165            break; 
    167         // 支払い方法が変更された場合 
    168         case 'payment': 
    169             // 配送時間の配列を生成 
    170             $this->lfSetDelivTime(); 
    171             break; 
     166 
    172167        default: 
    173168            // 受注一時テーブルからの情報を格納 
    174             $this->lfSetOrderTempData($uniqid); 
    175             break; 
    176         } 
     169            $this->objFormParam->setParam($arrOrderTemp); 
     170            break; 
     171        } 
     172 
     173        // 配送時間を取得 
     174        $this->arrDelivTime = $objPurchase->getDelivTime($this->cartKey); 
    177175 
    178176        // 支払い方法の画像があるなしを取得($img_show true:ある false:なし) 
    179177        $this->img_show = $this->lfGetImgShow($this->arrPayment); 
    180         // お届け日一覧の取得 
     178        // FIXME お届け日一覧の取得 
    181179        $this->arrDelivDate = $this->lfGetDelivDate(); 
    182180 
     
    342340        $total_inctax = $objCartSess->getAllProductsTotal(); 
    343341        // 支払い方法の取得 
    344         $this->arrPayment = $this->lfGetPayment($total_inctax); 
     342        //$this->arrPayment = $this->lfGetPayment($total_inctax); 
    345343        // お届け時間の取得 
    346344        $arrRet = $objDb->sfGetDelivTime($this->objFormParam->getValue('payment_id')); 
     
    366364        $this->objFormParam->addParam("お支払い方法", "payment_id", INT_LEN, "n", array("EXIST_CHECK", "MAX_LENGTH_CHECK", "NUM_CHECK")); 
    367365        $this->objFormParam->addParam("ポイント", "use_point", INT_LEN, "n", array("MAX_LENGTH_CHECK", "NUM_CHECK", "ZERO_START")); 
    368         $this->objFormParam->addParam("お届け時間", "deliv_time_id", INT_LEN, "n", array("MAX_LENGTH_CHECK", "NUM_CHECK")); 
     366        $this->objFormParam->addParam("お届け時間", "deliv_time_id", INT_LEN, "n", array("MAX_LENGTH_CHECK", "NUM_CHECK"), "", false); 
    369367        $this->objFormParam->addParam("ご質問", "message", LTEXT_LEN, "KVa", array("SPTAB_CHECK", "MAX_LENGTH_CHECK")); 
    370368        $this->objFormParam->addParam("ポイントを使用する", "point_check", INT_LEN, "n", array("MAX_LENGTH_CHECK", "NUM_CHECK"), '2'); 
    371         $this->objFormParam->addParam("お届け日", "deliv_date", STEXT_LEN, "KVa", array("MAX_LENGTH_CHECK")); 
    372     } 
    373  
    374     function lfGetPayment($total_inctax, $productTypeId, $productClassIds) { 
    375  
    376         // 有効な支払方法を取得 
    377         $objProduct = new SC_Product(); 
    378         $paymentIds = $objProduct->getEnablePaymentIds($productClassIds); 
    379         $where = 'del_flg = 0 AND payment_id IN (' . implode(', ', array_pad(array(), count($paymentIds), '?')) . ')'; 
    380  
    381         $objQuery = new SC_Query(); 
    382         $objQuery->setOrder("rank DESC"); 
    383         // 削除されていない支払方法を取得 
    384         $arrRet = $objQuery->select("payment_id, payment_method, rule, upper_rule, note, payment_image", "dtb_payment", $where, $paymentIds); 
    385  
    386         // 配列初期化 
    387         $data = array(); 
    388         // 選択可能な支払方法を判定 
    389         foreach($arrRet as $data) { 
    390             // 下限と上限が設定されている 
    391             if (strlen($data['rule']) != 0 && strlen($data['upper_rule']) != 0) { 
    392                 if ($data['rule'] <= $total_inctax && $data['upper_rule'] >= $total_inctax) { 
    393                     $arrPayment[] = $data; 
    394                 } 
    395             } 
    396             // 下限のみ設定されている 
    397             elseif (strlen($data['rule']) != 0) { 
    398                 if($data['rule'] <= $total_inctax) { 
    399                     $arrPayment[] = $data; 
    400                 } 
    401             } 
    402             // 上限のみ設定されている 
    403             elseif (strlen($data['upper_rule']) != 0) { 
    404                 if($data['upper_rule'] >= $total_inctax) { 
    405                     $arrPayment[] = $data; 
    406                 } 
    407             } 
    408             // いずれも設定なし 
    409             else { 
    410                 $arrPayment[] = $data; 
    411             } 
    412         } 
    413         return $arrPayment; 
    414     } 
    415  
     369        $this->objFormParam->addParam("お届け日", "deliv_date", STEXT_LEN, "KVa", array("MAX_LENGTH_CHECK"), "", false); 
     370    } 
     371 
     372   
    416373    /* 入力内容のチェック */ 
    417     function lfCheckError($arrData) { 
     374    function lfCheckError($arrData, $arrPayment) { 
    418375        // 入力データを渡す。 
    419376        $arrRet =  $this->objFormParam->getHashArray(); 
     
    446403        $objCartSess = new SC_CartSession(); 
    447404        // 購入金額の取得得 
    448         $total_inctax = $objCartSess->getAllProductsTotal(); 
    449         // 支払い方法の取得 
    450         $arrPayment = $this->lfGetPayment($total_inctax, $this->cartKey, 
    451                                           $objCartSess->getAllProductClassID($this->cartKey)); 
     405        $total_inctax = $objCartSess->getAllProductsTotal($this->cartKey); 
    452406        $pay_flag = true; 
    453407        foreach ($arrPayment as $key => $payment) { 
     
    482436 
    483437        if (strlen($sqlval['payment_id']) >= 1) { 
    484             list($sqlval['charge'], $sqlval['deliv_id']) = $this->lfGetPaymentInfo($sqlval['payment_id']); 
     438            // FIXME list($sqlval['charge'], $sqlval['deliv_id']) = $this->lfGetPaymentInfo($sqlval['payment_id']); 
    485439        } 
    486440 
     
    583537    function lfSetOrderTempData($uniqid) { 
    584538        $objQuery = new SC_Query(); 
    585         $col = "payment_id, use_point, deliv_time_id, message, point_check, deliv_date"; 
     539        $col = "payment_id, use_point, message, point_check "; 
    586540        $from = "dtb_order_temp"; 
    587541        $where = "order_temp_id = ?"; 
     
    595549    function lfGetImgShow($arrPayment) { 
    596550        $img_show = false; 
    597         foreach ($this->arrPayment as $payment) { 
     551        foreach ($arrPayment as $payment) { 
    598552            if (strlen($payment["payment_image"]) > 0 ){ 
    599553                $img_show = true; 
Note: See TracChangeset for help on using the changeset viewer.