バージョン選択

フォーラム

メニュー

オンライン状況

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

サイト内検索

質問 > フロント機能 > 2.13系メール便の対応について

フロント機能

新規スレッドを追加する

フラット表示 前のトピック | 次のトピック
投稿者 スレッド
harusame
投稿日時: 2014/8/10 11:34
対応状況: −−−
半人前
登録日: 2014/7/30
居住地: 奈良
投稿: 27
Re: 2.13系メール便の対応について
解決いたしました。

何がどうなったのかわからないのですが、
SC_Helper_Delivery_Ex.phpを参考サイト通り
<?php
/*
 * This file is part of EC-CUBE
 *
 * Copyright(c) 2000-2013 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 function getList($product_type_id,$mail_delivery_available=true) {
		$mail_deliv_id=20;
		$objQuery = & SC_Query_Ex::getSingletonInstance();
		$objQuery->setOrder('rank DESC');
		$where='product_type_id = ? AND del_flg = 0';
		$arrval=array($product_type_id);
		if(!$mail_delivery_available){
			$where.=' AND deliv_id !=?';
			$arrval[]=$mail_deliv_id;
		}
		return $objQuery->select('*', 'dtb_deliv', $where ,$arrval );
	}
}

上記のような記述とし、

SC_Helper_Purchase_Ex.phpを
<?php
/*
 * This file is part of EC-CUBE
 *
 * Copyright(c) 2000-2013 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_Purchase.php';

/**
 * 商品購入関連のヘルパークラス(拡張).
 *
 * LC_Helper_Purchase をカスタマイズする場合はこのクラスを編集する.
 *
 * @package Helper
 * @author Kentaro Ohkouchi
 * @version $Id: SC_Helper_Purchase_Ex.php 22856 2013-06-08 07:35:27Z Seasoft $
 */
class SC_Helper_Purchase_Ex extends SC_Helper_Purchase
{

		#メール便対応商品
		function checkMailDeliverAvailable($productTypeId, &$objCartSession) {

		$available = false;

		// カート内の情報を取得
		$items = $objCartSession->getCartList($productTypeId);
		if (count(array_keys($items))) {
			$available = true;
			foreach (array_keys($items) as $key) {
				$item = & $items[$key];
				$product = & $item['productsClass'];
				if ($product['mail_deliver_enabled'] == MAIL_DELIVER_ENABLED) {
					continue;
				} else {
					$available = false;
				}
			}
		}
		return $available;
	}
}

上記のようにしましたところ、
正常に動作いたしておりました。


全くどの部分での不具合だったのか、
どの部分で改善したのかがわからないのが納得いかないのですが、
結果、
メール便のみカートにある場合、メール便を表示、
宅急便も混ざっている場合、メール便非表示、
という状態とすることができました。


yuh様には、長期間に渡り、
本当に、本当に、細かいところまで親切にお教えいただき、
大変勉強になり、メール便対応サイトにもすることができ、
感謝してもしきれないほどです。
本当に、本当に、ありがとうございました。


本番サイトへ移行し、
問題が無ければ、解決済みとさせていただきます。
フラット表示 前のトピック | 次のトピック


題名 投稿者 日時
   2.13系メール便の対応について harusame 2014/7/30 17:05
     Re: 2.13系メール便の対応について bucchi 2014/8/3 14:21
       Re: 2.13系メール便の対応について harusame 2014/8/3 18:11
         Re: 2.13系メール便の対応について yuh 2014/8/3 20:59
           Re: 2.13系メール便の対応について harusame 2014/8/4 11:42
             Re: 2.13系メール便の対応について yuh 2014/8/4 13:50
               Re: 2.13系メール便の対応について harusame 2014/8/4 17:25
                 Re: 2.13系メール便の対応について yuh 2014/8/4 17:35
                   Re: 2.13系メール便の対応について harusame 2014/8/4 18:56
                     Re: 2.13系メール便の対応について yuh 2014/8/4 21:35
                       Re: 2.13系メール便の対応について harusame 2014/8/5 15:09
                         Re: 2.13系メール便の対応について yuh 2014/8/5 15:33
                           Re: 2.13系メール便の対応について harusame 2014/8/5 16:00
                             Re: 2.13系メール便の対応について yuh 2014/8/5 16:10
                               Re: 2.13系メール便の対応について harusame 2014/8/5 17:07
                                 Re: 2.13系メール便の対応について yuh 2014/8/5 17:36
                                   Re: 2.13系メール便の対応について harusame 2014/8/5 19:01
                                     Re: 2.13系メール便の対応について yuh 2014/8/5 21:36
                                       Re: 2.13系メール便の対応について harusame 2014/8/5 23:47
                                         Re: 2.13系メール便の対応について yuh 2014/8/5 23:58
                                           Re: 2.13系メール便の対応について harusame 2014/8/9 10:39
                                             Re: 2.13系メール便の対応について yuh 2014/8/9 19:12
                                               Re: 2.13系メール便の対応について harusame 2014/8/10 11:06
                                               » Re: 2.13系メール便の対応について harusame 2014/8/10 11:34
                                                   Re: 2.13系メール便の対応について harusame 2014/8/10 11:50
                                                     Re: 2.13系メール便の対応について yuh 2014/8/10 12:17
                                                       Re: 2.13系メール便の対応について harusame 2014/8/10 12:28
                                                         Re: 2.13系メール便の対応について harusame 2014/8/10 13:32
                                                           Re: 2.13系メール便の対応について yuh 2014/8/10 13:44
                                                             Re: 2.13系メール便の対応について harusame 2014/8/10 14:04
                                                               Re: 2.13系メール便の対応について harusame 2014/12/16 15:53

 



ログイン


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

統計情報

総メンバー数は89,489名です
総投稿数は110,101件です

投稿数ランキング

1
seasoft
7367
2
468
3217
3
AMUAMU
2712
4
nanasess
2314
5
umebius
2085
6
yuh
1819
7
h_tanaka
1655
8
red
1570
9
mcontact
1306
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.