source: branches/version-2_12-dev/data/Smarty/templates/sphone/mypage/index.tpl @ 21864

Revision 21864, 6.8 KB checked in by h_yoshimoto, 12 years ago (diff)

#1831 Copyrightを更新

  • Property svn:eol-style set to LF
  • Property svn:keywords set to Id
  • Property svn:mime-type set to text/x-smarty-template; charset=UTF-8
Line 
1<!--{*
2/*
3 * This file is part of EC-CUBE
4 *
5 * Copyright(c) 2000-2012 LOCKON CO.,LTD. All Rights Reserved.
6 *
7 * http://www.lockon.co.jp/
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 2
12 * of the License, or (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
22 */
23*}-->
24
25<section id="mypagecolumn">
26
27    <h2 class="title"><!--{$tpl_title|h}--></h2>
28        <!--{if $tpl_navi != ""}-->
29            <!--{include file=$tpl_navi}-->
30        <!--{else}-->
31            <!--{include file=`$smarty.const.TEMPLATE_REALDIR`mypage/navi.tpl}-->
32        <!--{/if}-->
33
34        <form name="form1" id="form1" method="post" action="<!--{$smarty.const.ROOT_URLPATH}-->mypage/index.php">
35            <input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" />
36            <input type="hidden" name="order_id" value="" />
37            <input type="hidden" name="pageno" value="<!--{$objNavi->nowpage}-->" />
38
39            <h3 class="title_mypage"><!--{$tpl_subtitle|h}--></h3>
40            <!--{if $objNavi->all_row > 0}-->
41
42                <!--★インフォメーション★-->
43                <div class="information">
44                    <p><span class="attention"><span id="historycount"><!--{$objNavi->all_row}--></span>件</span>の購入履歴があります。</p>
45                </div>
46
47                <div class="form_area">
48
49                    <!--▼フォームボックスここから -->
50                    <div class="formBox">
51                        <!--{section name=cnt loop=$arrOrder max=$dispNumber}-->
52                            <!--▼商品 -->
53                            <div class="arrowBox">
54                                <p>
55                                    <em>注文番号:</em><span class="order_id"><!--{$arrOrder[cnt].order_id}--><!--{assign var=payment_id value="`$arrOrder[cnt].payment_id`"}--></span><br />
56                                    <em>購入日時:</em><span class="create_date"><!--{$arrOrder[cnt].create_date|sfDispDBDate}--></span><br />
57                                    <em>お支払い方法:</em><span class="payment_id"><!--{$arrPayment[$payment_id]|h}--></span><br />
58                                    <em>合計金額:</em><span class="payment_total"><!--{$arrOrder[cnt].payment_total|number_format}--></span>円
59                                </p>
60                                <a href="<!--{$smarty.const.ROOT_URLPATH}-->mypage/history.php?order_id=<!--{$arrOrder[cnt].order_id}-->" rel="external"></a>
61                            </div>
62                            <!--▲商品 -->
63                        <!--{/section}-->
64                    </div><!-- /.formBox -->
65                </div><!-- /.form_area-->
66                <div class="btn_area">
67                    <!--{if $objNavi->all_row > $dispNumber}-->
68                        <p><a href="javascript: void(0);" class="btn_more" id="btn_more_history" onClick="getHistory(5); return false;" rel="external">もっとみる(+<!--{$dispNumber}-->件)</a></p>
69                    <!--{/if}-->
70                </div>
71            <!--{else}-->
72                <div class="form_area">
73                    <div class="information">
74                        <p>購入履歴はありません。</p>
75                    </div>
76                </div><!-- /.form_area-->
77            <!--{/if}-->
78        </form>
79</section>
80
81<!--▼検索バー -->
82<section id="search_area">
83    <form method="get" action="<!--{$smarty.const.ROOT_URLPATH}-->products/list.php">
84        <input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" />
85        <input type="hidden" name="mode" value="search" />
86        <input type="search" name="name" id="search" value="" placeholder="キーワードを入力" class="searchbox" >
87    </form>
88</section>
89<!--▲検索バー -->
90
91<script>
92    var pageNo = 2;
93    var url = "<!--{$smarty.const.ROOT_URLPATH}-->mypage/history.php";
94    var statusImagePath = "<!--{$TPL_URLPATH}-->";
95
96    function getHistory(limit) {
97        $.mobile.showPageLoadingMsg();
98        var i = limit;
99        //送信データを準備
100        var postData = {};
101        $('#form1').find(':input').each(function(){
102            postData[$(this).attr('name')] = $(this).val();
103        });
104        postData["mode"] = "getList";
105        postData["pageno"] = pageNo;
106        postData["disp_number"] = i;
107
108        $.ajax({
109            type: "POST",
110            url: "<!--{$smarty.const.ROOT_URLPATH}-->mypage/index.php",
111            data: postData,
112            cache: false,
113            dataType: "json",
114            error: function(XMLHttpRequest, textStatus, errorThrown){
115                alert(textStatus);
116                $.mobile.hidePageLoadingMsg();
117            },
118            success: function(result){
119                for (var j = 0; j < i; j++) {
120                    if (result[j] != null) {
121                        var history = result[j];
122                        var historyHtml = "";
123                        var maxCnt = $(".arrowBox").length - 1;
124                        var historyEl = $(".arrowBox").get(maxCnt);
125                        historyEl = $(historyEl).clone(true).insertAfter(historyEl);
126                        maxCnt++;
127
128                        //注文番号をセット
129                        $($(".arrowBox span.order_id").get(maxCnt)).text(history.order_id);
130                        //購入日時をセット
131                        $($(".arrowBox span.create_date").get(maxCnt)).text(history.create_date);
132                        //支払い方法をセット
133                        $($(".arrowBox span.payment_id").get(maxCnt)).text(history.payment_id);
134                        //合計金額をセット
135                        $($(".arrowBox span.payment_total").get(maxCnt)).text(history.payment_total);
136                        //履歴URLをセット
137                        $($(".arrowBox a").get(maxCnt)).attr("href", url + "?order_id=" + history.order_id);
138                    }
139                }
140                pageNo++;
141
142                //すべての商品を表示したか判定
143                if (parseInt($("#historycount").text()) <= $(".arrowBox").length) {
144                    $("#btn_more_history").hide();
145                }
146                $.mobile.hidePageLoadingMsg();
147            }
148        });
149    }
150</script>
Note: See TracBrowser for help on using the repository browser.