EC-CUBE ログイン中の場合、「新規会員登録」ボタンを非表示にする
1、\data\class_extends\page_
1 2 |
// ローカルフックポイントを実行. $this->doLocalHookpointBefore($objPlugin); |
の下に以下のソースを追加します。
1 2 3 4 5 6 7 8 |
//ログイン判定と名前取得 $objCustomer = new SC_Customer(); if ( $objCustomer->isLoginSuccess() ) { $this->tpl_login = true; $this->tpl_name1 = $objCustomer->getValue( 'name01' ); $this->tpl_name2 = $objCustomer->getValue( 'name02' ); } |
2、管理画面のデザイン管理>PC>ヘッダー/ フッダー設定から「ヘッダー」を編集します。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
<!--{if $tpl_login}--> <ul> <li class="mypage"> <a href="<!--{$smarty.const.HTTPS_URL}-->mypage/login.php"><img class="hover_change_image" src="<!--{$TPL_URLPATH}-->img/common/btn_header_mypage.jpg" alt="MYページ" /></a> </li> <li> <a href="<!--{$smarty.const.CART_URL}-->"><img class="hover_change_image" src="<!--{$TPL_URLPATH}-->img/common/btn_header_cart.jpg" alt="カゴの中を見る" /></a> </li> </ul> <!--{else}--> <ul> <li class="mypage"> <a href="<!--{$smarty.const.HTTPS_URL}-->mypage/login.php"><img class="hover_change_image" src="<!--{$TPL_URLPATH}-->img/common/btn_header_mypage.jpg" alt="MYページ" /></a> </li> <li class="entry"> <a href="<!--{$smarty.const.ROOT_URLPATH}-->entry/kiyaku.php"><img class="hover_change_image" src="<!--{$TPL_URLPATH}-->img/common/btn_header_entry.jpg" alt="会員登録" /></a> </li> <li> <a href="<!--{$smarty.const.CART_URL}-->"><img class="hover_change_image" src="<!--{$TPL_URLPATH}-->img/common/btn_header_cart.jpg" alt="カゴの中を見る" /></a> </li> </ul> <!--{/if}--> |
以上です。
ディスカッション
コメント一覧
まだ、コメントがありません