Index: /branches/version-2_12-dev/data/class_extends/helper_extends/SC_Helper_Category_Ex.php
===================================================================
--- /branches/version-2_12-dev/data/class_extends/helper_extends/SC_Helper_Category_Ex.php	(revision 22588)
+++ /branches/version-2_12-dev/data/class_extends/helper_extends/SC_Helper_Category_Ex.php	(revision 22588)
@@ -0,0 +1,39 @@
+<?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.
+ */
+
+// {{{ requires
+require_once CLASS_REALDIR . 'helper/SC_Helper_Category.php';
+
+/**
+ * カテゴリーを管理するヘルパークラス(拡張).
+ *
+ * LC_Helper_Category をカスタマイズする場合はこのクラスを編集する.
+ *
+ * @package Helper
+ * @author pineray
+ * @version $Id:$
+ */
+class SC_Helper_Category_Ex extends SC_Helper_Category
+{
+    //put your code here
+}
Index: /branches/version-2_12-dev/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_Category.php
===================================================================
--- /branches/version-2_12-dev/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_Category.php	(revision 22586)
+++ /branches/version-2_12-dev/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_Category.php	(revision 22588)
@@ -130,20 +130,9 @@
     function lfGetCatTree($arrParentCategoryId, $count_check = false)
     {
-        $objQuery =& SC_Query_Ex::getSingletonInstance();
         $objDb = new SC_Helper_DB_Ex();
-
-        $col = '*';
-        $from = 'dtb_category left join dtb_category_total_count ON dtb_category.category_id = dtb_category_total_count.category_id';
-        // 登録商品数のチェック
-        if ($count_check) {
-            $where = 'del_flg = 0 AND product_count > 0';
-        } else {
-            $where = 'del_flg = 0';
-        }
-        $objQuery->setOption('ORDER BY rank DESC');
-        $arrRet = $objQuery->select($col, $from, $where);
-
-        $arrTree = SC_Utils_Ex::buildTree('category_id', 'parent_category_id', 10, $arrRet);
-
+        $objCategory = new SC_Helper_Category_Ex();
+        $arrTree = $objCategory->getTree($count_check);
+
+        $arrCategory = $objCategory->getList($count_check);
         foreach ($arrParentCategoryId as $category_id) {
             $arrParentID = $objDb->sfGetParents(
@@ -154,5 +143,5 @@
             );
             $arrBrothersID = SC_Utils_Ex::sfGetBrothersArray(
-                $arrRet,
+                $arrCategory,
                 'parent_category_id',
                 'category_id',
@@ -160,5 +149,5 @@
             );
             $arrChildrenID = SC_Utils_Ex::sfGetUnderChildrenArray(
-                $arrRet,
+                $arrCategory,
                 'parent_category_id',
                 'category_id',
Index: /branches/version-2_12-dev/data/class/helper/SC_Helper_Category.php
===================================================================
--- /branches/version-2_12-dev/data/class/helper/SC_Helper_Category.php	(revision 22588)
+++ /branches/version-2_12-dev/data/class/helper/SC_Helper_Category.php	(revision 22588)
@@ -0,0 +1,79 @@
+<?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.
+ */
+
+/**
+ * カテゴリーを管理するヘルパークラス.
+ *
+ * @package Helper
+ * @author pineray
+ * @version $Id:$
+ */
+class SC_Helper_Category
+{
+    /**
+     * カテゴリー一覧の取得.
+     * 
+     * @param boolean $count_check 登録商品数をチェックする場合はtrue
+     * @param boolean $cid_to_key 配列のキーをカテゴリーIDにする場合はtrue
+     * @return array カテゴリー一覧の配列
+     */
+    public function getList($count_check = FALSE, $cid_to_key = FALSE)
+    {
+        $objQuery =& SC_Query_Ex::getSingletonInstance();
+        $col = '*';
+        $from = 'dtb_category left join dtb_category_total_count ON dtb_category.category_id = dtb_category_total_count.category_id';
+        // 登録商品数のチェック
+        if ($count_check) {
+            $where = 'del_flg = 0 AND product_count > 0';
+        } else {
+            $where = 'del_flg = 0';
+        }
+        $objQuery->setOption('ORDER BY rank DESC');
+        $arrCategory = $objQuery->select($col, $from, $where);
+
+        if ($cid_to_key) {
+            // 配列のキーをカテゴリーIDに
+            $arrTmp = array();
+            foreach ($arrCategory as $category) {
+                $arrTmp[$category['category_id']] = $category;
+            }
+            $arrCategory =& $arrTmp;
+            unset($arrTmp);
+        }
+        
+        return $arrCategory;
+    }
+
+    /**
+     * カテゴリーツリーの取得.
+     * 
+     * @param boolean $count_check 登録商品数をチェックする場合はtrue
+     * @return type
+     */
+    public function getTree($count_check = FALSE)
+    {
+        $arrList = $this->getList($count_check);
+        $arrTree = SC_Utils_Ex::buildTree('category_id', 'parent_category_id', LEVEL_MAX, $arrList);
+        return $arrTree;
+    }
+}
