バージョン選択

フォーラム

メニュー

オンライン状況

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

サイト内検索

質問 > フロント機能 > 商品合計金額別、地域別で送料を変更したいのですが

フロント機能

新規スレッドを追加する

フラット表示 前のトピック | 次のトピック
投稿者 スレッド
paperyu
投稿日時: 2016/4/8 9:32
対応状況: −−−
半人前
登録日: 2016/4/6
居住地:
投稿: 21
Re: 商品合計金額別、地域別で送料を変更したいのですが
yuh様

お世話になります。
お教えいただきありがとうございます。

今、コードを入れ直してみたのですが、送料が反映されないようです。
SC_Helper_Delivery_Ex.phpにお教えいただいたコードを入れたところ、
追加した最初の行
public static function getDelivFee($pref_id, $deliv_id = 0,$total = 0)
で[シンタックスエラー]が発生したと表示されました。
これが何か影響があるのでしょうか?

重ね重ねで本当に申し訳ありません。
どうかお教えいただけますと助かります。

◆SC_Helper_Delivery_Ex.php

<?php 
/*
 * This file is part of EC-CUBE
 *
 * Copyright(c) 2000-2014 LOCKON CO.,LTD. All Rights Reserved.
 *
 * http://www.lockon.co.jp/
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */

 require_once CLASS_REALDIR . 'helper/SC_Helper_Delivery.php';

 /**
 * 配送方法を管理するヘルパークラス(拡張).
 *
 * LC_Helper_Delivery をカスタマイズする場合はこのクラスを編集する.
 *
 * @package Helper
 * @author pineray
 * @version $Id:$
 */ class SC_Helper_Delivery_Ex extends SC_Helper_Delivery
 {
 //put your code here
 }


 public static function getDelivFee($pref_id, $deliv_id = 0,$total = 0)
 {
 $objQuery =& SC_Query_Ex::getSingletonInstance();
 if (!is_array($pref_id))
 { $pref_id = array($pref_id);
 }
 $sql = <<< __EOS__
 SELECT T1.fee AS fee FROM dtb_delivfee T1
 JOIN dtb_deliv T2
 ON T1.deliv_id = T2.deliv_id
 WHERE T1.pref = ?
 AND T1.deliv_id = ?
 AND T2.del_flg = 0
 __EOS__;
 $result = 0;
 //------------------------------------------------------------------------
 foreach ($pref_id as $pref) {
 if(in_array($pref,array(1,47)) AND $total >= 5400 ){
 $flag = false;
 }elseif(!in_array($pref,array(1,47)) AND $total >= 4320 ){
 $flag = false;
 }else{
 $flag = true; }
 if($flag === true){
 $result += $objQuery->getOne($sql, array($pref, $deliv_id));
 }
 }
 //------------------------------------------------------------------------
 return $result;
 }
フラット表示 前のトピック | 次のトピック


題名 投稿者 日時
   商品合計金額別、地域別で送料を変更したいのですが paperyu 2016/4/6 19:30
     Re: 商品合計金額別、地域別で送料を変更したいのですが yuh 2016/4/7 17:59
     » Re: 商品合計金額別、地域別で送料を変更したいのですが paperyu 2016/4/8 9:32
         Re: 商品合計金額別、地域別で送料を変更したいのですが yuh 2016/4/8 14:10
           Re: 商品合計金額別、地域別で送料を変更したいのですが paperyu 2016/4/8 14:58
             Re: 商品合計金額別、地域別で送料を変更したいのですが paperyu 2016/4/28 11:40

 



ログイン


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

統計情報

総メンバー数は90,190名です
総投稿数は110,326件です

投稿数ランキング

1
seasoft
7369
2
468
3217
3
AMUAMU
2712
4
nanasess
2314
5
umebius
2085
6
yuh
1819
7
h_tanaka
1682
8
red
1571
9
mcontact
1352
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.