ECCUBEの商品詳細ページのMETA keyword, description にも設定は出来るが、デフォルト機能としては全商品詳細ページで同じものが使われてしまい、商品1つ1つに個別の設定が出来ない。
そこで、以下のファイルにちょいと追加を加えるだけで商品別に keyword, description を設定出来るようになる。
data/class/pages/products/LC_Page_Products_Detail.php
260行目あたりに以下を追加
//この商品を買った人はこんな商品も買っています
$this->arrRelateProducts = $this->lfGetRelateProducts($tmp_id);$this->lfConvertParam();
// – ここから追加
$this->arrPageLayout[‘description’] = $this->arrPageLayout[‘description’]. $this->arrProduct[‘main_list_comment’];
$this->arrPageLayout[‘keyword’] = $this->arrPageLayout[‘keyword’]. “,”. $this->arrProduct[‘comment3’];
// – ここまで追加$objView->assignobj($this);
$objView->display(SITE_FRAME);
}
そして上記2行を追加したら、ECCUBE の商品管理画面で、一覧コメント欄に入れたものが description として表示され、検索ワード欄に入れたものが keyword として表示されるようになります。
【追記】2011/01/19 19:30
data\Smarty\templates\(templatedir)\site_frame.tpl
このファイルの keyword, description のあたりに
<meta name=”description” content=”<!–{$arrPageLayout.description|escape}–>” />
<meta name=”keywords” content=”<!–{$arrPageLayout.keyword|escape}–>” />
こういうのが入ってないと置換されないのでチェック。