Home > EC-CUBE > [EC-CUBE]パンくずリスト

[EC-CUBE]パンくずリスト このエントリをはてなブックマークに追加このエントリをdel.icio.usに追加このエントリをLivedoor Clipに追加このエントリをYahoo!ブックマークに追加このエントリをFC2ブックマークに追加このエントリをNifty Clipに追加このエントリをPOOKMARK. Airlinesに追加このエントリをBuzzurl(バザール)に追加このエントリをChoixに追加このエントリをnewsingに追加

/data/class_extends/helper_extends/SC_Helper_DB_Ex.php
37行目に以下を追加


    function sfGetTopicPath($category_id){
        // 商品が属するカテゴリIDを縦に取得
        $objQuery = new SC_Query();
        $arrCatID = $this->sfGetParents($objQuery, "dtb_category", "parent_category_id", "category_id", $category_id);
        $TopicPath = " > ";

        // カテゴリー名称を取得する
        foreach($arrCatID as $key => $val){
            $sql = "SELECT category_name FROM dtb_category WHERE category_id = ?";
            $arrVal = array($val);
            $CatName = $objQuery->getOne($sql,$arrVal);
            if( $val != $category_id){
              $TopicPath .= '<a href="./list.php?category_id=' .$val . '">' . $CatName . '</a> > ';
            }else{
              $TopicPath .= $CatName;
            }
        }

        return $TopicPath;
    }
    function sfGetTopicPath2($category_id){
        // 商品が属するカテゴリIDを縦に取得
        $objQuery = new SC_Query();
        $arrCatID = $this->sfGetParents($objQuery, "dtb_category", "parent_category_id", "category_id", $category_id);
        $TopicPath = " > ";

        // カテゴリー名称を取得する
        foreach($arrCatID as $key => $val){
            $sql = "SELECT category_name FROM dtb_category WHERE category_id = ?";
            $arrVal = array($val);
            $CatName = $objQuery->getOne($sql,$arrVal);
              $TopicPath .= '<a href="./list.php?category_id=' .$val . '">' . $CatName . '</a> > ';
            }
        return $TopicPath;
    }

/data/class/pages/products/LC_Page_Products_List.php
107行目に以下を追加


            $TopicPath = $objDb->sfGetTopicPath($arrCategory_id[0]);
            $this->tpl_topicpath = $TopicPath;

/data/class/pages/products/LC_Page_Products_Detail.php
211行目に以下を追加


        $arrTopicPath = $objDb->sfGetTopicPath2($arrCategory_id[0]);
        $this->tpl_topicpath = $arrTopicPath;

/data/Smarty/templates/default/site_main.tpl
37行目に以下を追加


<!--{if $tpl_topicpath != ""}-->
<a href="<!--{$smarty.const.SITE_URL}-->index.php">TopPage</a>
<!--{$tpl_topicpath}-->
<!--{$arrProduct.name|escape}-->
<!--{/if}-->

Comments:0

Comment Form
Remember personal info

Trackbacks:0

Listed below are links to weblogs that reference
[EC-CUBE]パンくずリスト from www.gnnk.net

Home > EC-CUBE > [EC-CUBE]パンくずリスト

Search
Feeds
[PR]

Return to page top