Changeset 17970
- Timestamp:
- 2009/04/11 05:19:52 (15 years ago)
- Location:
- branches/comu-ver2/data
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/comu-ver2/data/Smarty/templates/default/admin/products/confirm.tpl
r17967 r17970 90 90 </tr> 91 91 <!--{/if}--> 92 93 <tr> 94 <th>商品送料</th> 95 <td> 96 <!--{$arrForm.deliv_fee|escape}--> 97 円</td> 98 </tr> 92 99 <tr> 93 100 <th>ポイント付与率</th> -
branches/comu-ver2/data/Smarty/templates/default/admin/products/product.tpl
r17967 r17970 152 152 <!--{/if}--> 153 153 154 <!--{* 送料の個別指定は次期開発で追加予定155 154 <tr> 156 155 <th>商品送料</th> … … 159 158 <input type="text" name="deliv_fee" value="<!--{$arrForm.deliv_fee|escape}-->" size="6" class="box6" maxlength="<!--{$smarty.const.PRICE_LEN}-->" style="<!--{if $arrErr.deliv_fee != ""}-->background-color: <!--{$smarty.const.ERR_COLOR}--><!--{/if}-->"/>円 160 159 <span class="attention"> (半角数字で入力)</span> 161 </td> 162 </tr> 163 *}--> 164 160 <!--{if $smarty.const.OPTION_PRODUCT_DELIV_FEE != 1}--><br /><span class="attention">※現在無効です</span> (パラメータ OPTION_PRODUCT_DELIV_FEE)<!--{/if}--> 161 </td> 162 </tr> 165 163 <tr> 166 164 <th>ポイント付与率<span class="attention"> *</span></th> -
branches/comu-ver2/data/class/SC_CartSession.php
r17891 r17970 348 348 } 349 349 350 // 全商品の合計送料351 function getAllProductsDelivFee() {352 // ポイント合計353 $total = 0;354 $max = $this->getMax();355 for($i = 0; $i <= $max; $i++) {356 $deliv_fee = $_SESSION[$this->key][$i]['deliv_fee'];357 $quantity = $_SESSION[$this->key][$i]['quantity'];358 $total+= ($deliv_fee * $quantity);359 }360 return $total;361 }362 363 350 // カートの中の売り切れチェック 364 351 function chkSoldOut($arrCartList, $is_mobile = false){ -
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.