Changeset 17970 for branches/comu-ver2/data/class/helper/SC_Helper_DB.php
- Timestamp:
- 2009/04/11 05:19:52 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/comu-ver2/data/class/helper/SC_Helper_DB.php
r17854 r17970 1496 1496 // 商品ごとの送料が有効の場合 1497 1497 if (OPTION_PRODUCT_DELIV_FEE == 1) { 1498 $arrData['deliv_fee']+= $objCartSess->getAllProductsDelivFee(); 1498 // 全商品の合計送料を加算する 1499 $this->lfAddAllProductsDelivFee($arrData, $objPage, $objCartSess); 1499 1500 } 1500 1501 1501 1502 // 配送業者の送料が有効の場合 1502 1503 if (OPTION_DELIV_FEE == 1) { 1503 // 送料の合計を計算する1504 $ arrData['deliv_fee'] += $this->sfGetDelivFee($arrData);1504 // 都道府県、支払い方法から配送料金を加算する 1505 $this->lfAddDelivFee($arrData); 1505 1506 } 1506 1507 … … 1677 1678 } 1678 1679 1679 1680 /** 1681 * 全商品の合計送料を加算する 1682 */ 1683 function lfAddAllProductsDelivFee(&$arrData, &$objPage, &$objCartSess) { 1684 $objQuery = new SC_Query(); 1685 $max = $objCartSess->getMax(); 1686 for ($i = 0; $i <= $max; $i++) { 1687 // 商品送料 1688 $deliv_fee = $objQuery->getOne('SELECT deliv_fee FROM dtb_products WHERE product_id = ?', array($_SESSION[$objCartSess->key][$i]['id'][0])); 1689 // 数量 1690 $quantity = $_SESSION[$objCartSess->key][$i]['quantity']; 1691 // 合算 1692 $arrData['deliv_fee'] += $deliv_fee * $quantity; 1693 } 1694 } 1695 1696 /** 1697 * 都道府県、支払い方法から配送料金を加算する. 1698 * 1699 * @param array $arrData 1700 */ 1701 function lfAddDelivFee(&$arrData) { 1702 $arrData['deliv_fee'] += $this->sfGetDelivFee($arrRet); 1703 } 1680 1704 1681 1705 }
Note: See TracChangeset
for help on using the changeset viewer.