バージョン選択

フォーラム

メニュー

オンライン状況

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

サイト内検索

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

フロント機能

新規スレッドを追加する

フラット表示 前のトピック | 次のトピック
投稿者 スレッド
yuh
投稿日時: 2014/8/9 19:12
対応状況: −−−
登録日: 2013/1/9
居住地: 大阪
投稿: 1819
Re: 2.13系メール便の対応について
ちょっと気になってたんで、こちらのテストサイトでためしに作ってみましたが、正常に動作しますね・・・。
一応参考にしつつぱっと作ったんで、若干の差分があると思うんで内容を載せておきます。


SC_Helper_Delivery_Ex.php

    #メール便対応商品
    #メール便対応商品
    public function getList($product_type_id = null, $has_deleted = false, $mailflag = false )
    {
        $objQuery =& SC_Query_Ex::getSingletonInstance();
        $col = '*';
        $where = '';
        $arrVal = array();
        if (!$has_deleted) {
            $where .= 'del_flg = 0';
        }
        if (!is_null($product_type_id)) {
            if (!$has_deleted) {
                $where .= ' AND ';
            }
            $where .= 'product_type_id = ?';
            $arrVal[] = $product_type_id;
        }
        if ( $mailflag === false ) {
            if($where != ""){
                $where .= ' AND';
            }
            $where .= ' deliv_id <> ?';
            $arrVal[] = 5;//メール便のdeliv_id
        }
        $table = 'dtb_deliv';
        $objQuery->setOrder('rank DESC');
        $arrRet = $objQuery->select($col, $table, $where, $arrVal);
        return $arrRet;
    }


SC_Helper_Purchase_Ex.php

#メール便対応商品
    public function checkMailDeliverAvailable($productTypeId, &$objCartSession) 
    {
        $objQuery       = SC_Query_Ex::getSingletonInstance();
        $available = false;
        // カート内の情報を取得
        $items = $objCartSession->getCartList($productTypeId);
        $idary = array();
        foreach ( $items as $key => $value ) {
            if ( $value['productsClass']['product_id'] AND preg_match('/^[0-9]+$/',$value['productsClass']['product_id']) ) {
                $idary[] = $value['productsClass']['product_id'];
            }
        }
        if ( count($idary) > 0 ) {
            $query = '
            SELECT 
                IF(MAX(mail_deliver_enabled) = MIN(mail_deliver_enabled),MAX(mail_deliver_enabled),MIN(mail_deliver_enabled))
            FROM
                dtb_products
            WHERE
                product_id IN('.implode(",", array_fill(0, count($idary), "?")).')
            ';
            $check = $objQuery->getOne($query,$idary);
            if ( $check == 1 ) {
                return true;
            } else {
                return false;
            }
        }
        return false;
    }


LC_Page_Shopping_Payment.php

		$flag = $objPurchase->checkMailDeliverAvailable($cart_key, &$objCartSess) ;
		$this->arrDeliv = $objDelivery->getList($cart_key,false,$flag);
//↑ここを追加
//        $this->arrDeliv = $objDelivery->getList($cart_key);


テストでUPしていて、
http://skip.ec-lab.net/products/list.php?category_id=7
一部カート部分テスト中ですが、配送方法を取得する部分の処理自体は同じなので参考までに。
フラット表示 前のトピック | 次のトピック


題名 投稿者 日時
   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,337名です
総投稿数は110,082件です

投稿数ランキング

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