Changeset 19920


Ignore:
Timestamp:
2011/01/15 21:29:14 (10 years ago)
Author:
nanasess
bzr:base-revision:
ohkouchi@loop-az.jp-20110114152640-oyr8511e1um7qqsm
bzr:committer:
Kentaro Ohkouchi <nanasess@fsm.ne.jp>
bzr:file-ids:

data/class/helper/SC_Helper_Purchase.php sc_helper_purchase.p-20101020100530-jyaoa7ch9pdfjqzp-1
data/class/pages/admin/order/LC_Page_Admin_Order_Edit.php 15594@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Fpages%2Fadmin%2Forder%2FLC_Page_Admin_Order_Edit.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/install.php 15078@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Finstall.php
bzr:mapping-version:
v4
bzr:merge:

nanasess@fsm.ne.jp-20110115122738-ci4z58a047yhmpok
bzr:repository-uuid:
1e3b908f-19a9-db11-a64c-001125224ba8
bzr:revision-id:
nanasess@fsm.ne.jp-20110115122909-wo6cr5i2y578ohwq
bzr:revno:
2649
bzr:revprop:branch-nick:
branches/version-2_5-dev
bzr:root:
branches/version-2_5-dev
bzr:text-revisions:

data/class/helper/SC_Helper_Purchase.php nanasess@fsm.ne.jp-20110115122738-ci4z58a047yhmpok
data/class/pages/admin/order/LC_Page_Admin_Order_Edit.php nanasess@fsm.ne.jp-20110115122738-ci4z58a047yhmpok
data/class/pages/shopping/LC_Page_Shopping_Deliv.php nanasess@fsm.ne.jp-20110115122738-ci4z58a047yhmpok
bzr:timestamp:
2011-01-15 21:29:09.743999958 +0900
bzr:user-agent:
bzr2.2.2+bzr-svn1.0.4
svn:original-date:
2011-01-15T12:29:09.744000Z
Message:

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

  • 会員で通常購入時, 別のお届け先を指定すると複数購入扱いになってしまうのを修正
Location:
branches/version-2_5-dev/data/class
Files:
3 edited

Legend:

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

    r19912 r19920  
    281281     * 受注情報($src)を $dest の order_* へコピーする. 
    282282     * 
     283     * TODO 汎用的にして SC_Utils へ移動 
     284     * 
    283285     * @param array $dest コピー先の配列 
    284286     * @param array $src コピー元の配列 
     
    294296                                         'addr01', 'addr02', 
    295297                                         'tel01', 'tel02', 'tel03')) { 
     298        if (!SC_Utils_Ex::isBlank($prefix)) { 
     299            $prefix = $prefix . '_'; 
     300        } 
     301        if (!SC_Utils_Ex::isBlank($src_prefix)) { 
     302            $src_prefix = $src_prefix . '_'; 
     303        } 
    296304        foreach ($keys as $key) { 
    297305            if (in_array($key, $keys)) { 
    298                 $dest[$prefix . '_' . $key] = $src[$src_prefix . '_' . $key]; 
     306                $dest[$prefix . $key] = $src[$src_prefix . $key]; 
    299307            } 
    300308        } 
  • branches/version-2_5-dev/data/class/pages/admin/order/LC_Page_Admin_Order_Edit.php

    r19919 r19920  
    703703        $result = $objQuery->update($table, $dest, "order_id = ?", array($order_id)); 
    704704        if ($result == 0) { 
     705            $dest['order_id'] = $order_id; 
    705706            $result = $objQuery->insert($table, $dest); 
    706707        } 
  • branches/version-2_5-dev/data/class/pages/shopping/LC_Page_Shopping_Deliv.php

    r19912 r19920  
    195195        case 'customer_addr': 
    196196            $sqlval = array(); 
     197            $sqlval['deliv_id'] = $objPurchase->getDeliv($this->cartKey); 
    197198            // 会員登録住所がチェックされている場合 
    198199            if ($_POST['deliv_check'] == '-1') { 
    199200                // 会員情報の住所を受注一時テーブルに書き込む 
    200201                $objPurchase->copyFromCustomer($sqlval, $objCustomer, 'shipping'); 
    201                 $sqlval['deliv_id'] = $objPurchase->getDeliv($this->cartKey); 
    202202                $objPurchase->saveShippingTemp($sqlval); 
    203203                $objPurchase->saveOrderTemp($uniqid, $sqlval, $objCustomer); 
     
    211211            } elseif($_POST['deliv_check'] >= 1) { 
    212212                if (SC_Utils_Ex::sfIsInt($_POST['deliv_check'])) { 
    213                     $deliv_count = $objQuery->count("dtb_other_deliv","customer_id=? and other_deliv_id = ?" ,array($objCustomer->getValue('customer_id'), $_POST['deliv_check'])); 
    214                     if ($deliv_count != 1) { 
     213                    $otherDeliv = $objQuery->getRow("*", "dtb_other_deliv","customer_id = ? AND other_deliv_id = ?" 
     214                                                    ,array($objCustomer->getValue('customer_id'), $_POST['deliv_check'])); 
     215                    if (SC_Utils_Ex::isBlank($otherDeliv)) { 
    215216                        SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR); 
    216217                    } 
    217218 
    218                     $otherDeliv = $objQuery->select("*", "dtb_other_deliv", 
    219                                                     "other_deliv_id = ?", 
    220                                                     array($_POST['deliv_check'])); 
    221                     $sqlval = $otherDeliv[0]; 
    222                     $sqlval['deliv_id'] = $objPurchase->getDeliv($this->cartKey); 
    223                     $objPurchase->saveShippingTemp($sqlval, $_POST['deliv_check']); 
     219                    $objPurchase->copyFromOrder($sqlval, $otherDeliv, 'shipping', '');; 
     220                    $objPurchase->saveShippingTemp($sqlval); 
    224221                    $objPurchase->saveOrderTemp($uniqid, $sqlval, $objCustomer); 
    225222 
     
    248245 
    249246        default: 
    250             //$objPurchase->unsetShippingTemp(); 
     247            $objPurchase->unsetShippingTemp(); 
    251248            $arrOrderTemp = $objPurchase->getOrderTemp($uniqid); 
    252249            if (empty($arrOrderTemp)) $arrOrderTemp = array(""); 
Note: See TracChangeset for help on using the changeset viewer.