バージョン選択

フォーラム

メニュー

オンライン状況

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

サイト内検索

質問 > その他 > (2.12.3)カテゴリーを消す方法について

その他

新規スレッドを追加する

フラット表示 前のトピック | 次のトピック
投稿者 スレッド
sumida
投稿日時: 2014/7/30 22:28
対応状況: −−−
仙人
登録日: 2013/2/10
居住地: 広島県呉市ときどき瀬戸内海
投稿: 641
Re: (2.12.3)カテゴリーを消す方法について
難しく考えるのをやめて、シンプルに考えてみました。
(1)トップページ表示
  第1階層をすべて表示
(2)第1階層表示...(a)
  (a)の第2(子)階層表示
  (a)以外の第1階層も表示 <-- ここを表示しない場合、コメントを外してください。
(3)第2階層以降表示...(b)
  (b)の第1階層から子階層まで表示
  (b)の第1階層以外の第1階層は表示しない <-- 標準との違いは、ここ

として、
category.tpl
変更しない。

LC_Page_FrontParts_Bloc_Category.php

                // 選択中のカテゴリID
                $this->tpl_category_id = $this->lfGetSelectedCategoryId($_GET);
                // カテゴリツリーの取得
                $this->arrTree = $this->lfGetCatTree($this->tpl_category_id, true);
// added
                if ($this->tpl_category_id[0] == '0') {
                    // トップページ表示
                } else {
                    // 親カテゴリツリーの取得
                    $arrParent_tpl_category_id = SC_Helper_DB_Ex::sfGetParents('dtb_category', 'parent_category_id', 'category_id', $this->tpl_category_id);
                    array_pop($arrParent_tpl_category_id);
                    if (count($arrParent_tpl_category_id) == 0) {
                        // 第1階層カテゴリ表示
/* もし、他の第1階層カテゴリを表示しないなら、以下を有効にする。
                        foreach ($this->arrTree as &$arrTree) {
                            if ($arrTree['parent_category_id'] == '0') {
                                // 第1階層カテゴリ
                                if (!in_array($arrTree['category_id'], $this->tpl_category_id)) {
                                    // 親カテゴリでない
                                    $arrTree['display'] = 0;
                                }
                            }
                        }
*/
                    } else {
                        // 第2階層以降カテゴリ表示
                        foreach ($this->arrTree as &$arrTree) {
                            if ($arrTree['parent_category_id'] == '0') {
                                // 第1階層カテゴリ
                                if (!in_array($arrTree['category_id'], $arrParent_tpl_category_id)) {
                                    // 親カテゴリでない
                                    $arrTree['display'] = 0;
                                }
                            }
                        }
                    }
                }
// added
                break;

フラット表示 前のトピック | 次のトピック


題名 投稿者 日時
   (2.12.3)カテゴリーを消す方法について motorp 2014/7/29 16:42
     Re: (2.12.3)カテゴリーを消す方法について tsuji 2014/7/30 9:24
       Re: (2.12.3)カテゴリーを消す方法について motorp 2014/7/30 13:25
         Re: (2.12.3)カテゴリーを消す方法について sumida 2014/7/30 14:50
           Re: (2.12.3)カテゴリーを消す方法について motorp 2014/7/30 20:34
           » Re: (2.12.3)カテゴリーを消す方法について sumida 2014/7/30 22:28
         Re: (2.12.3)カテゴリーを消す方法について tsuji 2014/7/31 9:27
           Re: (2.12.3)カテゴリーを消す方法について motorp 2014/7/31 17:39
           Re: (2.12.3)カテゴリーを消す方法について motorp 2014/7/31 17:42
             Re: (2.12.3)カテゴリーを消す方法について motorp 2014/8/5 17:15
               Re: (2.12.3)カテゴリーを消す方法について sumida 2014/8/5 20:37
                 Re: (2.12.3)カテゴリーを消す方法について motorp 2014/8/5 23:37

 



ログイン


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

統計情報

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

投稿数ランキング

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