- 2008-01-13 (日) 5:01
/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}-->
- Newer: [本]2008年1月
- Older: [本]2007年12月
Comments:0
Trackbacks:0
- Listed below are links to weblogs that reference
- [EC-CUBE]パンくずリスト from www.gnnk.net