source: branches/version-2_13-dev/data/Smarty/templates/sphone/frontparts/bloc/navi_header.tpl @ 23494

Revision 23494, 4.2 KB checked in by pineray, 10 years ago (diff)

#2386 PHP 警告撲滅 for 2.13.3

ロケール処理も考慮に入れて、Smartyの修飾子で対応するように変更.

Line 
1<!--{*
2 * This file is part of EC-CUBE
3 *
4 * Copyright(c) 2000-2013 LOCKON CO.,LTD. All Rights Reserved.
5 *
6 * http://www.lockon.co.jp/
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
21 *}-->
22
23<nav class="header_navi">
24    <ul>
25        <li class="mypage"><img src="<!--{$TPL_URLPATH}-->img/header/btn_header_mypage.png" onclick="fnShowPopupmyPage(this)" width="30" height="20" alt="マイページ" /></li>
26        <li class="cart"><img src="<!--{$TPL_URLPATH}-->img/header/btn_header_cart.png" onclick="fnShowPopupCart(this)" width="30" height="20" alt="カート" /></li>
27    </ul>
28</nav>
29<!--!!空ボックス -->
30<div class="popup_mypage">
31    <!--{if $tpl_login}-->
32        <p><span class="mini">ようこそ</span><br />
33        <a href="<!--{$smarty.const.HTTPS_URL}-->mypage/login.php" rel="external"><!--{$tpl_name1|h}--> <!--{$tpl_name2|h}-->さん</a></p>
34        <!--{if $smarty.const.USE_POINT !== false}-->
35            <p>所持ポイント<!--{$tpl_user_point|n2s|default:0}-->pt</p>
36        <!--{/if}-->
37    <!--{else}-->
38        <p>ようこそ<br />
39            ゲストさん</p>
40        <p><a href="<!--{$smarty.const.HTTPS_URL}-->mypage/login.php" rel="external">ログイン</a></p>
41    <!--{/if}-->
42</div>
43
44<div class="popup_cart">
45    <!--{if count($arrCartList) > 0}-->
46        <h2><a rel="external" href="<!--{$smarty.const.CART_URL|h}-->">カートの中</a></h2>
47        <!--{foreach from=$arrCartList item=key}-->
48            <div class="product_type">
49                <!--{if count($arrCartList) > 1}-->
50                    <p><span class="product_type">[<!--{$key.productTypeName|h}-->]</span></p>
51                <!--{/if}-->
52                <p><span class="mini">商品数:</span><span class="quantity"><!--{$key.quantity|n2s}--></span>点<br />
53                    <span class="mini">合計:</span><span class="money"><!--{$key.totalInctax|n2s}--></span>円(税込)</p>
54                <hr class="dashed" />
55                <!--{if $freeRule > 0 && $key.productTypeId|h != $smarty.const.PRODUCT_TYPE_DOWNLOAD}-->
56                    <!--{if $key.delivFree > 0}-->
57                        <p class="attention free_money_area">あと<span class="free_money"><!--{$key.delivFree|n2s}--></span>円で送料無料</p>
58                    <!--{else}-->
59                        <p class="attention free_money_area">現在、送料無料です</p>
60                    <!--{/if}-->
61                <!--{/if}-->
62            </div>
63        <!--{/foreach}-->
64    <!--{else}-->
65        ※ 現在カート内に商品はございません。
66    <!--{/if}-->
67</div>
68
69
70<script>
71    var stateMyPage = 0;
72    var stateCart = 0;
73    function fnShowPopupmyPage(el) {
74        $("div.popup_mypage").css("left", $(el).offset().left - $("div.popup_mypage").width() + 15);
75        $("div.popup_mypage").toggle();
76        //表示状態の更新
77        if (stateMyPage == 0) {
78            stateMyPage = 1;
79        } else {
80            stateMyPage = 0;
81        }
82
83        //カート情報の非表示化
84        if (stateCart == 1) {
85            $("div.popup_cart").hide();
86            stateCart = 0;
87        }
88    }
89
90    function fnShowPopupCart(el) {
91        $("div.popup_cart").css("left", $(el).offset().left - $("div.popup_cart").width() + 15);
92        $("div.popup_cart").toggle();
93        //表示状態の更新
94        if (stateCart == 0) {
95            stateCart = 1;
96        } else {
97            stateCart = 0;
98        }
99
100        //カート情報の非表示化
101        if (stateMyPage == 1) {
102            $("div.popup_mypage").hide();
103            stateMyPage = 0;
104        }
105    }
106</script>
Note: See TracBrowser for help on using the repository browser.