Ignore:
Timestamp:
2011/01/16 19:56:17 (11 years ago)
Author:
nanasess
bzr:base-revision:
nanasess@fsm.ne.jp-20110116062219-tpkgcgbv2y4kxl6r
bzr:committer:
Kentaro Ohkouchi <nanasess@fsm.ne.jp>
bzr:file-ids:

data/class/SC_CartSession.php 15078@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2FSC_CartSession.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/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_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_Payment.php 15223@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Fpages%2Fshopping%2FLC_Page_Shopping_Payment.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
bzr:mapping-version:
v4
bzr:merge:

nanasess@fsm.ne.jp-20110116105415-kglfjf04e1qc1pjx
bzr:repository-uuid:
1e3b908f-19a9-db11-a64c-001125224ba8
bzr:revision-id:
nanasess@fsm.ne.jp-20110116105610-cbdyux6eh8j902v3
bzr:revno:
2657
bzr:revprop:branch-nick:
branches/version-2_5-dev
bzr:root:
branches/version-2_5-dev
bzr:text-revisions:

data/class/SC_CartSession.php nanasess@fsm.ne.jp-20110116105415-kglfjf04e1qc1pjx
data/class/helper/SC_Helper_DB.php nanasess@fsm.ne.jp-20110116105415-kglfjf04e1qc1pjx
data/class/helper/SC_Helper_Purchase.php nanasess@fsm.ne.jp-20110116105415-kglfjf04e1qc1pjx
data/class/pages/admin/order/LC_Page_Admin_Order_Edit.php nanasess@fsm.ne.jp-20110116105415-kglfjf04e1qc1pjx
data/class/pages/shopping/LC_Page_Shopping_Confirm.php nanasess@fsm.ne.jp-20110116105415-kglfjf04e1qc1pjx
html/install/sql/create_table_mysql.sql nanasess@fsm.ne.jp-20110116105415-kglfjf04e1qc1pjx
html/install/sql/create_table_pgsql.sql nanasess@fsm.ne.jp-20110116105415-kglfjf04e1qc1pjx
bzr:timestamp:
2011-01-16 19:56:10.862999916 +0900
bzr:user-agent:
bzr2.2.2+bzr-svn1.0.4
svn:original-date:
2011-01-16T10:56:10.863000Z
Message:

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

  • 送料計算を修正
File:
1 edited

Legend:

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

    r19909 r19928  
    14771477 
    14781478    /** 
    1479      * 都道府県、支払い方法から配送料金を取得する. 
    1480      * 
    1481      * @param array $arrData 各種情報 
    1482      * @return string 指定の都道府県, 支払い方法の配送料金 
     1479     * 都道府県から配送料金を取得する. 
     1480     * 
     1481     * @param integer|array $pref_id 都道府県ID 又は都道府県IDの配列 
     1482     * @return string 指定の都道府県, 商品種別の配送料金 
    14831483     */ 
    14841484    function sfGetDelivFee($pref_id, $product_type_id) { 
    14851485        $objQuery =& SC_Query::getSingletonInstance(); 
    14861486 
    1487         // 配送業者から配送料を取得 
    1488         if($deliv_id != "") { 
    1489  
    1490             // 都道府県が指定されていない場合は、東京都の番号を指定しておく 
    1491             if($pref_id == "") { 
    1492                 $pref_id = 13; 
    1493             } 
    1494  
    1495             $objQuery =& SC_Query::getSingletonInstance(); 
    1496             $where = "product_type_id = ? AND pref = ?"; 
    1497             $arrRet= $objQuery->select("fee", "dtb_delivfee", $where, array($product_type_id, $pref_id)); 
    1498         } 
    1499         return $arrRet[0]['fee']; 
     1487        /* 
     1488         * FIXME 都道府県が指定されていない場合は、東京都の番号を指定しておく 
     1489         * http://svn.ec-cube.net/open_trac/ticket/410 
     1490         */ 
     1491        if($pref_id == "") { 
     1492            $pref_id = 13; 
     1493        } 
     1494        if (!is_array($pref_id)) { 
     1495            $pref_id = array($pref_id); 
     1496        } 
     1497        $sql = <<< __EOS__ 
     1498            SELECT SUM(T1.fee) AS fee 
     1499              FROM dtb_delivfee T1 
     1500              JOIN dtb_deliv T2 
     1501                ON T1.deliv_id = T2.deliv_id 
     1502             WHERE T1.pref = ? AND T2.product_type_id = ? 
     1503__EOS__; 
     1504 
     1505        $result = 0; 
     1506        foreach ($pref_id as $pref) { 
     1507            $result += $objQuery->getOne($sql, array($pref, $product_type_id)); 
     1508        } 
     1509        return $result; 
    15001510    } 
    15011511 
Note: See TracChangeset for help on using the changeset viewer.