バージョン選択

フォーラム

メニュー

オンライン状況

65 人のユーザが現在オンラインです。 (58 人のユーザが フォーラム を参照しています。)
登録ユーザ: 0
ゲスト: 65
もっと...

サイト内検索

質問 > フロント機能 > dtb_orderテーブルにポイント割引金額を登録したい。

フロント機能

新規スレッドを追加する

フラット表示 前のトピック | 次のトピック
投稿者 スレッド
ゲスト
投稿日時: 2012/10/17 12:32
対応状況: −−−
Re: dtb_orderテーブルにポイント割引金額を登録したい。
参考になるかどうか、、、
    function calculate($productTypeId, &$objCustomer, $use_point = 0,
        $deliv_pref = '', $charge = 0, $discount = 0, $deliv_id = 0
    ) {

        $results = array();
        $total_point = $this->getAllProductsPoint($productTypeId);
        $results['tax'] = $this->getAllProductsTax($productTypeId);
        $results['subtotal'] = $this->getAllProductsTotal($productTypeId);
        $results['deliv_fee'] = 0;

        // 商品ごとの送料を加算
        if (OPTION_PRODUCT_DELIV_FEE == 1) {
            $cartItems = $this->getCartList($productTypeId);
            foreach ($cartItems as $arrItem) {
                $results['deliv_fee'] += $arrItem['productsClass']['deliv_fee'] * $arrItem['quantity'];
            }
        }

        // 配送業者の送料を加算
        if (OPTION_DELIV_FEE == 1
            && !SC_Utils_Ex::isBlank($deliv_pref)
            && !SC_Utils_Ex::isBlank($deliv_id)) {
            $results['deliv_fee'] += $this->sfGetDelivFee($deliv_pref, $deliv_id);
        }

        // 送料無料チェック
        if ($this->isDelivFree($productTypeId)) {
            $results['deliv_fee'] = 0;
        }

        // 合計を計算
        $results['total'] = $results['subtotal'];
        $results['total'] += $results['deliv_fee'];
        $results['total'] += $charge;
        $results['total'] -= $discount;

        // お支払い合計
        $results['payment_total'] = $results['total'] - $use_point * POINT_VALUE;

        // 加算ポイントの計算
        if (USE_POINT !== false) {
            $results['add_point'] = SC_Helper_DB_Ex::sfGetAddPoint($total_point, $use_point);
            if ($objCustomer != '') {
                // 誕生日月であった場合
                if ($objCustomer->isBirthMonth()) {
                    $results['birth_point'] = BIRTH_MONTH_POINT;
                    $results['add_point'] += $results['birth_point'];
                }
            }
&#160; &#160; &#160; &#160; &#160; &#160; if ($results['add_point'] < 0) {
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; $results['add_point'] = 0;
&#160; &#160; &#160; &#160; &#160; &#160; }
&#160; &#160; &#160; &#160; }
&#160; &#160; &#160; &#160;&#160;
&#160; &#160; &#160; &#160; // hideki-s
&#160; &#160; &#160; &#160; $results['point_discount'] = 1234;
&#160; &#160; &#160; &#160;&#160;
&#160; &#160; &#160; &#160; return $results;
&#160; &#160; }

と、いう様に、return前に$results['point_discount'] = 1234;
と、試しに、固定値を入れてみたところ、
「dtb_order と dtb_order_tempテーブルのpoint_discount」
に、1234が格納されました。。。
フラット表示 前のトピック | 次のトピック


題名 投稿者 日時
   dtb_orderテーブルにポイント割引金額を登録したい。 seike 2012/10/15 12:35
     Re: dtb_orderテーブルにポイント割引金額を登録したい。 ゲスト 2012/10/16 17:17
     » Re: dtb_orderテーブルにポイント割引金額を登録したい。 ゲスト 2012/10/17 12:32
         Re: dtb_orderテーブルにポイント割引金額を登録したい。 seike 2012/10/18 16:21
         Re: dtb_orderテーブルにポイント割引金額を登録したい。 seike 2012/10/19 7:58

 



ログイン


EC-CUBE公式 Amazon Payプラグイン

統計情報

総メンバー数は88,861名です
総投稿数は109,996件です

投稿数ランキング

1
seasoft
7367
2
468
3217
3
AMUAMU
2712
4
nanasess
2313
5
umebius
2085
6
yuh
1819
7
h_tanaka
1646
8
red
1570
9
mcontact
1294
10
tsuji
958
11
fukap
907
12
shutta
835
13
tao_s
799
14 ramrun 789
15 karin 689
16 sumida 641
17
homan
633
18 DELIGHT 572
19
patapata
502
20
flealog
485


ネットショップの壺

EC-CUBEインテグレートパートナー

Copyright© EC-CUBE CO.,LTD. All Rights Reserved.