source: branches/comu-ver2/data/Smarty/templates/default/cart/index.tpl @ 17605

Revision 17605, 7.6 KB checked in by Seasoft, 16 years ago (diff)

/index.php にリンクやリダイレクトしている箇所の「index.php」を定数化。

  • 定数「DIR_INDEX_FILE」… DirectoryIndex? の実ファイル名。現状の EC-CUBE は、「index.php」。/html/define.php で定義するが、定義が無い場合 SC_Initial::defineDirectoryIndex() で「index.php」と定義。本来は、プログラム中で実ファイルとしての index.php を指すときとは、この定数を使うのが良い気がするが、今回はそこまでは書き換えていない。
  • 定数「USE_FILENAME_DIR_INDEX」… DIR_INDEX_FILE にアクセスするときにファイル名を使用するか。/html/define.php で定義。
  • 定数「DIR_INDEX_URL」… /index.php にリンクやリダイレクトしている箇所の「index.php」部分を示す。この定数は SC_Initial::defineDirectoryIndex() で自動生成する。

・$_SERVERPHP_SELF? や自身をあらわすファイル名を利用している箇所を文字列「?」に書き換え。これにより、/ が自己URLにリンクするときに /index.php となることを防ぐ。RFC3986 を参考にする。モバイル端末がこのRFCに準拠しているのか確信が無いので、モバイルではこの変更は見送った。
・従来 / にリンクしていた箇所に、定数「DIR_INDEX_URL」を付加。漏れがあると予測される。

  • Property svn:eol-style set to LF
  • Property svn:mime-type set to text/html; charset=UTF-8
Line 
1<!--{*
2 * This file is part of EC-CUBE
3 *
4 * Copyright(c) 2000-2007 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<!--▼CONTENTS-->
23<div id="under02column">
24  <div id="under02column_cart">
25    <h2 class="title"><!--{$tpl_title|escape}--></h2>
26    <p class="totalmoneyarea">
27      <!--★ポイント案内★-->
28      <!--{if $smarty.const.USE_POINT !== false}-->
29        <!--{if $tpl_login}-->
30          <!--{$tpl_name|escape}--> 様の、現在の所持ポイントは「<em><!--{$tpl_user_point|number_format|default:0}--> pt</em>」です。<br />
31        <!--{else}-->
32          ポイント制度をご利用になられる場合は、会員登録後ログインしていだだきますようお願い致します。<br />
33        <!--{/if}-->
34        ポイントは商品購入時に1pt=<!--{$smarty.const.POINT_VALUE}-->円として使用することができます。<br />
35      <!--{/if}-->
36     
37      <!--{* カゴの中に商品がある場合にのみ表示 *}-->
38      <!--{if count($arrProductsClass) > 0 }-->
39        お買い上げ商品の合計金額は「<em><!--{$tpl_total_pretax|number_format}-->円</em>」です。
40        <!--{if $arrInfo.free_rule > 0}-->
41          <!--{if $arrData.deliv_fee|number_format > 0}-->
42            あと「<em><!--{$tpl_deliv_free|number_format}-->円</em>」で送料無料です!!
43          <!--{else}-->
44            現在、「<em>送料無料</em>」です!!
45          <!--{/if}-->
46        <!--{/if}-->
47      <!--{/if}-->
48    </p>
49
50   <!--{if strlen($tpl_error) != 0}-->
51    <p class="attention"><!--{$tpl_error|escape}--></p>
52   <!--{/if}-->
53   
54   <!--{if strlen($tpl_message) != 0}-->
55    <p class="attention"><!--{$tpl_message|escape}--></p>
56   <!--{/if}-->
57
58   <!--{if count($arrProductsClass) > 0}-->
59   <form name="form1" id="form1" method="post" action="?">
60     <input type="hidden" name="mode" value="confirm" />
61     <input type="hidden" name="cart_no" value="" />
62     <table summary="商品情報">
63       <tr>
64         <th>削除</th>
65         <th>商品写真</th>
66         <th>商品名</th>
67         <th>単価</th>
68         <th>数量</th>
69         <th>小計</th>
70       </tr>
71      <!--{section name=cnt loop=$arrProductsClass}-->
72       <tr style="<!--{if $arrProductsClass[cnt].error}-->background-color: <!--{$smarty.const.ERR_COLOR}--><!--{/if}-->">
73         <td><a href="?" onclick="fnChangeAction('<!--{$smarty.server.PHP_SELF|escape}-->'); fnModeSubmit('delete', 'cart_no', '<!--{$arrProductsClass[cnt].cart_no}-->'); return false;">削除</a>
74         </td>
75         <td class="phototd">
76           <a href="?" onclick="win01('../products/detail_image.php?product_id=<!--{$arrProductsClass[cnt].product_id}-->&image=main_image','detail_image','<!--{$arrProductsClass[cnt].tpl_image_width}-->','<!--{$arrProductsClass[cnt].tpl_image_height}-->'); return false;" target="_blank">
77           <img src="<!--{$smarty.const.URL_DIR}-->resize_image.php?image=<!--{$arrProductsClass[cnt].main_list_image}-->&amp;width=65&amp;height=65" alt="<!--{$arrProductsClass[cnt].name|escape}-->" />
78           </a>
79         </td>
80         <td><!--{* 商品名 *}--><strong><!--{$arrProductsClass[cnt].name|escape}--></strong><br />
81           <!--{if $arrProductsClass[cnt].classcategory_name1 != ""}-->
82             <!--{$arrProductsClass[cnt].class_name1}-->:<!--{$arrProductsClass[cnt].classcategory_name1}--><br />
83           <!--{/if}-->
84           <!--{if $arrProductsClass[cnt].classcategory_name2 != ""}-->
85             <!--{$arrProductsClass[cnt].class_name2}-->:<!--{$arrProductsClass[cnt].classcategory_name2}-->
86           <!--{/if}-->
87         </td>
88         <td class="pricetd">
89         <!--{if $arrProductsClass[cnt].price02 != ""}-->
90           <!--{$arrProductsClass[cnt].price02|sfPreTax:$arrInfo.tax:$arrInfo.tax_rule|number_format}-->円
91         <!--{else}-->
92           <!--{$arrProductsClass[cnt].price01|sfPreTax:$arrInfo.tax:$arrInfo.tax_rule|number_format}-->円
93         <!--{/if}-->
94         </td>
95         <td id="quantity"><!--{$arrProductsClass[cnt].quantity}-->
96           <ul id="quantity_level">
97            <li><a href="?" onclick="fnChangeAction('<!--{$smarty.server.PHP_SELF|escape}-->'); fnModeSubmit('up','cart_no','<!--{$arrProductsClass[cnt].cart_no}-->'); return false"><img src="<!--{$TPL_DIR}-->img/cart/plus.gif" width="16" height="16" alt="+" /></a></li>
98            <li><a href="?" onclick="fnChangeAction('<!--{$smarty.server.PHP_SELF|escape}-->'); fnModeSubmit('down','cart_no','<!--{$arrProductsClass[cnt].cart_no}-->'); return false"><img src="<!--{$TPL_DIR}-->img/cart/minus.gif" width="16" height="16" alt="-" /></a></li>
99           </ul>
100         </td>
101         <td class="pricetd"><!--{$arrProductsClass[cnt].total_pretax|number_format}-->円</td>
102     </tr>
103     <!--{/section}-->
104     <tr>
105       <th colspan="5" class="resulttd">小計</th>
106       <td class="pricetd"><!--{$tpl_total_pretax|number_format}-->円</td>
107    </tr>
108    <tr>
109      <th colspan="5" class="resulttd">合計</th>
110      <td class="pricetd"><em><!--{$arrData.total-$arrData.deliv_fee|number_format}-->円</em></td>
111    </tr>
112    <!--{if $smarty.const.USE_POINT !== false}-->
113      <!--{if $arrData.birth_point > 0}-->
114      <tr>
115        <th colspan="5" class="resulttd">お誕生月ポイント</th>
116        <td class="pricetd"><!--{$arrData.birth_point|number_format}-->pt</td>
117      </tr>
118      <!--{/if}-->
119      <tr>
120        <th colspan="5" class="resulttd">今回加算ポイント</th>
121        <td class="pricetd"><!--{$arrData.add_point|number_format}-->pt</td>
122      </tr>
123    <!--{/if}-->
124  </table>
125  <p class="mini">※商品写真は参考用写真です。ご注文のカラーと異なる写真が表示されている場合でも、商品番号に記載されているカラー表示で間違いございませんのでご安心ください。</p>
126  <div class="tblareabtn">
127    <!--{if strlen($tpl_error) == 0}-->
128      <p>上記内容でよろしければ「購入手続きへ」ボタンをクリックしてください。</p>
129    <!--{/if}-->
130
131    <p>
132      <!--{if $tpl_prev_url != ""}-->
133        <a href="<!--{$tpl_prev_url}-->" onmouseover="chgImg('<!--{$TPL_DIR}-->img/cart/b_pageback_on.gif','back');" onmouseout="chgImg('<!--{$TPL_DIR}-->img/cart/b_pageback.gif','back');">
134          <img src="<!--{$TPL_DIR}-->img/cart/b_pageback.gif" width="150" height="30" alt="買い物を続ける" name="back" id="back" />
135          </a>&nbsp;&nbsp;
136      <!--{/if}-->
137      <!--{if strlen($tpl_error) == 0}-->
138        <input type="image" onmouseover="chgImgImageSubmit('<!--{$TPL_DIR}-->img/cart/b_buystep_on.gif',this)" onmouseout="chgImgImageSubmit('<!--{$TPL_DIR}-->img/cart/b_buystep.gif',this)" src="<!--{$TPL_DIR}-->img/cart/b_buystep.gif" class="box150"  alt="購入手続きへ" name="confirm" />
139      <!--{/if}-->
140     </p>
141  </div>
142</form>
143<!--{else}-->
144<p class="empty"><em>※ 現在カート内に商品はございません。</em></p>
145<!--{/if}-->
146</div>
147</div>
148<!--▲CONTENTS-->
Note: See TracBrowser for help on using the repository browser.