Index: /branches/version-2/data/Smarty/templates/default/detail.tpl
===================================================================
--- /branches/version-2/data/Smarty/templates/default/detail.tpl	(revision 16971)
+++ /branches/version-2/data/Smarty/templates/default/detail.tpl	(revision 17333)
@@ -130,4 +130,16 @@
           <!--{/if}-->
         <!--{/if}-->Pt</span></div>
+
+      <!--{* 関連カテゴリ *}-->
+      <div>関連カテゴリ：
+        <!--{section name=r loop=$arrRelativeCat}-->
+        <p>
+          <!--{section name=s loop=$arrRelativeCat[r]}-->
+          <a href="<!--{$smarty.const.URL_DIR}-->products/list.php?category_id=<!--{$arrRelativeCat[r][s].category_id}-->"><!--{$arrRelativeCat[r][s].category_name}--></a>
+          <!--{if !$smarty.section.s.last}--><!--{$smarty.const.SEPA_CATNAVI}--><!--{/if}-->
+          <!--{/section}-->
+        </p>
+        <!--{/section}-->
+      </div>
 
 
Index: /branches/version-2/data/class/pages/products/LC_Page_Products_Detail.php
===================================================================
--- /branches/version-2/data/class/pages/products/LC_Page_Products_Detail.php	(revision 16780)
+++ /branches/version-2/data/class/pages/products/LC_Page_Products_Detail.php	(revision 17333)
@@ -210,4 +210,7 @@
         $this->tpl_subtitle = $arrFirstCat['name'];
 
+        // 関連カテゴリを取得
+        $this->arrRelativeCat = $objDb->sfGetMultiCatTree($tmp_id);
+
         // DBからのデータを引き継ぐ
         $this->objUpFile->setDBFileList($this->arrProduct);
Index: /branches/version-2/data/class/helper/SC_Helper_DB.php
===================================================================
--- /branches/version-2/data/class/helper/SC_Helper_DB.php	(revision 16970)
+++ /branches/version-2/data/class/helper/SC_Helper_DB.php	(revision 17333)
@@ -564,4 +564,53 @@
 
     /**
+     * カテゴリツリーの取得を複数カテゴリーで行う.
+     *
+     * @param integer $product_id 商品ID
+     * @param bool $count_check 登録商品数のチェックを行う場合 true
+     * @return array カテゴリツリーの配列
+     */
+    function sfGetMultiCatTree($product_id, $count_check = false) {
+        $objQuery = new SC_Query();
+        $col = "";
+        $col .= " cat.category_id,";
+        $col .= " cat.category_name,";
+        $col .= " cat.parent_category_id,";
+        $col .= " cat.level,";
+        $col .= " cat.rank,";
+        $col .= " cat.creator_id,";
+        $col .= " cat.create_date,";
+        $col .= " cat.update_date,";
+        $col .= " cat.del_flg, ";
+        $col .= " ttl.product_count";
+        $from = "dtb_category as cat left join dtb_category_total_count as ttl on ttl.category_id = cat.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);
+
+        $arrCategory_id = $this->sfGetCategoryId($product_id, $status);
+
+        $arrCatTree = array();
+        foreach ($arrCategory_id as $pkey => $parent_category_id) {
+            $arrParentID = $this->sfGetParents($objQuery, 'dtb_category', 'parent_category_id', 'category_id', $parent_category_id);
+
+            foreach($arrParentID as $pid) {
+                foreach($arrRet as $key => $array) {
+                    if($array['category_id'] == $pid) {
+                        $arrCatTree[$pkey][] = $arrRet[$key];
+                        break;
+                    }
+                }
+            }
+        }
+
+        return $arrCatTree;
+    }
+
+    /**
      * 親カテゴリーを連結した文字列を取得する.
      *
