Ignore:
Timestamp:
2011/01/11 19:07:12 (15 years ago)
Author:
nanasess
bzr:base-revision:
svn-v4:1e3b908f-19a9-db11-a64c-001125224ba8:branches/version-2_5-dev:19867
bzr:committer:
Kentaro Ohkouchi <[email protected]>
bzr:file-ids:

data/Smarty/templates/default/shopping/confirm.tpl 15732@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2FSmarty%2Ftemplates%2Fdefault%2Fshopping%2Fconfirm.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/helper/SC_Helper_Purchase.php sc_helper_purchase.p-20101020100530-jyaoa7ch9pdfjqzp-1
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/install.php 15078@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Finstall.php
docs/eccube-diagram.jude eccubediagram.jude-20101102081620-jpq1fqmox6ocmuj3-2
bzr:mapping-version:
v4
bzr:merge:

[email protected]
bzr:repository-uuid:
1e3b908f-19a9-db11-a64c-001125224ba8
bzr:revision-id:
[email protected]
bzr:revno:
2597
bzr:revprop:branch-nick:
branches/version-2_5-dev
bzr:root:
branches/version-2_5-dev
bzr:text-revisions:

data/Smarty/templates/default/shopping/confirm.tpl [email protected]
data/Smarty/templates/default/shopping/payment.tpl [email protected]
data/class/helper/SC_Helper_Purchase.php [email protected]
data/class/pages/shopping/LC_Page_Shopping_Confirm.php [email protected]
data/class/pages/shopping/LC_Page_Shopping_Deliv.php [email protected]
data/class/pages/shopping/LC_Page_Shopping_Multiple.php [email protected]
data/class/pages/shopping/LC_Page_Shopping_Payment.php [email protected]
bzr:timestamp:
2011-01-11 19:04:55.760999918 +0900
bzr:user-agent:
bzr2.2.1+bzr-svn1.0.4
svn:original-date:
2011-01-11T10:04:55.761000Z
Message:

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

  • 購入確認画面を修正
Location:
branches/version-2_5-dev/data/class
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_5-dev/data/class/helper/SC_Helper_Purchase.php

    r19862 r19868  
    7979            } 
    8080        } 
     81 
    8182        $this->registerShipping($orderId, $shippingTemp); 
    8283        $objQuery->commit(); 
     
    188189 
    189190    /** 
     191     * 配送商品を設定する. 
     192     */ 
     193    function setShipmentItemTemp($otherDelivId, $productClassId, $quantity) { 
     194        $_SESSION['shipping'][$otherDelivId]['shipment_item'][$productClassId]['shipping_id'] = $otherDelivId; 
     195        $_SESSION['shipping'][$otherDelivId]['shipment_item'][$productClassId]['product_class_id'] = $productClassId; 
     196        $_SESSION['shipping'][$otherDelivId]['shipment_item'][$productClassId]['quantity'] += $quantity; 
     197 
     198        $objProduct = new SC_Product(); 
     199        if (empty($_SESSION['shipping'][$otherDelivId]['shipment_item'][$productClassId]['productsClass'])) { 
     200            $product = $objProduct->getDetailAndProductsClass($productClassId); 
     201            $_SESSION['shipping'][$otherDelivId]['shipment_item'][$productClassId]['productsClass'] = $product; 
     202        } 
     203        $incTax = SC_Helper_DB_Ex::sfCalcIncTax($_SESSION['shipping'][$otherDelivId]['shipment_item'][$productClassId]['productsClass']['price02']); 
     204        $_SESSION['shipping'][$otherDelivId]['shipment_item'][$productClassId]['total_inctax'] = $incTax * $_SESSION['shipping'][$otherDelivId]['shipment_item'][$productClassId]['quantity']; 
     205    } 
     206 
     207    /** 
     208     * 複数配送指定の購入かどうか. 
     209     * 
     210     * @return boolean 複数配送指定の購入の場合 true 
     211     */ 
     212    function isMultiple() { 
     213        return (count($this->getShippingTemp()) > 1); 
     214    } 
     215 
     216    /** 
    190217     * 配送情報をセッションに保存する. 
    191218     */ 
    192     function saveShippingTemp(&$src, $other_deliv_id = 0, 
    193                               $keys = array('name01', 'name02', 'kana01', 'kana02', 
    194                                             'sex', 'zip01', 'zip02', 'pref', 
    195                                             'addr01', 'addr02', 
    196                                             'tel01', 'tel02', 'tel03'), 
    197                               $prefix = 'shipping') { 
    198         $dest = array(); 
    199         foreach ($keys as $key) { 
    200             $dest[$prefix . '_' . $key] = $src[$prefix . '_' . $key]; 
    201         } 
    202         $_SESSION['shipping'][$other_deliv_id] = $src; 
     219    function saveShippingTemp(&$src, $otherDelivId = 0) { 
     220        $_SESSION['shipping'][$otherDelivId] = array_merge($_SESSION['shipping'][$otherDelivId], $src); 
    203221    } 
    204222 
  • branches/version-2_5-dev/data/class/pages/shopping/LC_Page_Shopping_Confirm.php

    r19861 r19868  
    7979        $objPurchase = new SC_Helper_Purchase_Ex(); 
    8080 
     81        $this->isMultiple = $objPurchase->isMultiple(); 
     82 
    8183        // 前のページで正しく登録手続きが行われた記録があるか判定 
    8284        SC_Utils_Ex::sfIsPrePage($objSiteSess); 
     
    128130        $this->payment_type = $payment_type; 
    129131 
     132        $this->shipping = $objPurchase->getShippingTemp(); 
     133 
    130134        if (!isset($_POST['mode'])) $_POST['mode'] = ""; 
    131135 
     
    143147 
    144148            // 集計結果を受注一時テーブルに反映 
    145             unset($arrData[0]); // FIXME 
    146             unset($arrData[1]); 
    147149            $objPurchase->saveOrderTemp($uniqid, $arrData, $objCustomer); 
    148150            // 正常に登録されたことを記録しておく 
  • branches/version-2_5-dev/data/class/pages/shopping/LC_Page_Shopping_Deliv.php

    r19862 r19868  
    219219 
    220220        default: 
     221            //$objPurchase->unsetShippingTemp(); 
    221222            $arrOrderTemp = $objPurchase->getOrderTemp($uniqid); 
    222223            if (empty($arrOrderTemp)) $arrOrderTemp = array(""); 
  • branches/version-2_5-dev/data/class/pages/shopping/LC_Page_Shopping_Multiple.php

    r19862 r19868  
    118118                        } 
    119119                        $sqlval[$other_deliv_id]['deliv_id'] = $objPurchase->getDeliv($this->cartKey); 
    120                         $sqlval[$other_deliv_id]['shipment_item'][$params['product_class_id' . $i]]['shipping_id'] = $other_deliv_id; 
    121                         $sqlval[$other_deliv_id]['shipment_item'][$params['product_class_id' . $i]]['quantity'] += $params['quantity' . $i]; 
    122                         $sqlval[$other_deliv_id]['shipment_item'][$params['product_class_id' . $i]]['product_class_id'] = $params['product_class_id' . $i]; 
     120                        $objPurchase->setShipmentItemTemp($other_deliv_id, $params['product_class_id' . $i], $params['quantity' . $i]); 
    123121                        $i++; 
    124122                    } 
  • branches/version-2_5-dev/data/class/pages/shopping/LC_Page_Shopping_Payment.php

    r19861 r19868  
    5454        $this->tpl_onload = "fnCheckInputPoint(); fnSetDelivTime('payment','payment_id','deliv_time_id');"; 
    5555        $this->tpl_title = "お支払方法・お届け時間等の指定"; 
     56        $masterData = new SC_DB_MasterData(); 
     57        $this->arrPref = $masterData->getMasterData('mtb_pref'); 
    5658    } 
    5759 
     
    7880        $objPurchase = new SC_Helper_Purchase_Ex(); 
    7981        $this->objCustomer = new SC_Customer(); 
     82 
     83        $this->shipping =& $objPurchase->getShippingTemp(); 
     84        $this->isMultiple = $objPurchase->isMultiple(); 
    8085 
    8186        // パラメータ管理クラス 
     
    366371        $this->objFormParam->addParam("お支払い方法", "payment_id", INT_LEN, "n", array("EXIST_CHECK", "MAX_LENGTH_CHECK", "NUM_CHECK")); 
    367372        $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")); 
    369373        $this->objFormParam->addParam("ご質問", "message", LTEXT_LEN, "KVa", array("SPTAB_CHECK", "MAX_LENGTH_CHECK")); 
    370374        $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")); 
     375 
     376        for ($i = 0; $i < count($this->shipping); $i++) { 
     377            $this->objFormParam->addParam("お届け時間", "deliv_time_id" . $i, INT_LEN, "n", array("MAX_LENGTH_CHECK", "NUM_CHECK")); 
     378            $this->objFormParam->addParam("お届け日", "deliv_date" . $i, STEXT_LEN, "KVa", array("MAX_LENGTH_CHECK")); 
     379        } 
    372380    } 
    373381 
Note: See TracChangeset for help on using the changeset viewer.