モバイルでもポイントを利用した決済ができるようにします。
まずはテンプレート。配達日時指定画面
/data/Smarty/templates/default/mobile/shopping/deliv_date.tpl
の33~35行目あたりを以下に変更。
<!-- ▼mobileポイント利用 -->
<!--{if $tpl_login == 1}-->
■ポイント利用<br />
現在の所持ポイントは「<font color="red"><!--{$tpl_user_point|default:0}--></font> pt」です。<br />
使用するポイントをご記入ください。ポイントを使用しない場合は「0」とご入力ください。<br />
※所持ポイント以上のポイントはご利用いただけません。<br />
<input type="hidden" name="point_check" value="1" />
<input type="text" name="use_point" istyle="4" />
<!--{/if}-->
<br/><br/>
<!-- ▲mobileポイント利用 -->
続いてご注文内容確認画面。
/data/Smarty/templates/default/mobile/shopping/confirm.tpl
の69行目あたりを編集。
※表現「商品合計」を「小計」に統一し、「円」を表示するようにしました。
値引き
(ポイントご使用時
):
<!--{assign
var=discount value
=`
$arrData.use_point
*$smarty.const.POINT_VALUE`
}--><!--{$discount|number_format|default:0}-->円
<br
><!--{if $arrData.charge
> 0}-->手数料:
<!--{$arrData.charge
|number_format}-->円
<br
><!--{/if}--> 合計:
<font color
="red"><!--{$arrData.payment_total
|number_format}-->円
</font
><br
><br>
【ポイント】<br>
ご注文前のポイント
:<!--{$tpl_user_point|number_format|default:0}-->pt<br
/>ご使用ポイント
:-<!--{$arrData.use_point
|number_format|default:0}-->pt<br
/><!--{if $arrData.birth_point > 0}-->
お誕生月ポイント
:+<!--{$arrData.birth_point
|number_format|default:0}-->pt<br
/><!--{/if}-->
今回加算されるポイント
:+<!--{$arrData.add_point
|number_format|default:0}-->pt<br
/><!--{assign var=total_point value=`$tpl_user_point-$arrData.use_point+$arrData.add_point`}-->
続いて、かご表示画面。
/data/Smarty/templates/default/mobile/cart/index.tpl
の63~68行目を以下の通り編集する。
※表現「商品合計」を「小計」に統一し、「円」を表示するようにしました。
合計
:<font color
="red"><!--{$arrData.total
-$arrData.deliv_fee
|number_format}-->円
</font
><br
><!--{if $arrData.birth_point > 0}-->
<!--{/if}-->
続いて、購入履歴詳細画面。
/data/Smarty/templates/default/mobile/mypage/history_detail.tpl
の56~58行目を以下の通り編集する。
※表現「商品合計」を「小計」に統一、「Pt」を「pt」に統一しました。
<!-- 使用ポイントここから -->
<!--{assign var=point_discount value="`$arrDisp.use_point*$smarty.const.POINT_VALUE`"}-->
<!--{if $point_discount > 0}-->
<!--{/if}-->
<!--{assign
var=key value
="discount"}--> <!--{if $arrDisp[$key] != "" && $arrDisp[$key] > 0}-->
<!--{/if}-->
<!-- 使用ポイントここまで -->
送料
:<!--{assign
var=key value
="deliv_fee"}--><!--{$arrDisp[$key]|escape
|number_format}-->円
<br
>手数料
:<!--{assign
var=key value
="charge"}--><!--{$arrDisp[$key]|escape
|number_format}-->円
<br
>合計
:<font color
="red"><!--{$arrDisp.payment_total
|number_format}-->円
</font
><br
><br>
<!-- 使用ポイントここから -->
ご使用ポイント
:<!--{assign
var=key value
="use_point"}--><!--{$arrDisp[$key]|number_format|default:0}-->pt<br
>今回加算されるポイント
:<!--{$arrDisp.add_point
|number_format|default:0}-->pt<br
><!-- 使用ポイントここまで -->
続いて、商品詳細画面。
/data/Smarty/templates/default/mobile/products/detail.tpl
の42~58目を以下の通り編集する。
<!--★価格★-->
販売価格(税込):
<font color="#FF0000">
<!--{if $arrProduct.price02_min == $arrProduct.price02_max}-->
<!--{$arrProduct.price02_min
|sfPreTax
:$arrSiteInfo.tax
:$arrSiteInfo.tax_rule
|number_format}--> <!--{else}-->
<!--{$arrProduct.price02_min
|sfPreTax
:$arrSiteInfo.tax
:$arrSiteInfo.tax_rule
|number_format}-->・
<!--{$arrProduct.price02_max
|sfPreTax
:$arrSiteInfo.tax
:$arrSiteInfo.tax_rule
|number_format}--> <!--{/if}-->
円</font><br/>
<!--{if $arrProduct.price01_max > 0}-->
<font color="#FF0000">
通常価格:
<!--{if $arrProduct.price01_min == $arrProduct.price01_max}-->
<!--{else}-->
<!--{/if}-->
円</font><br>
<!--{/if}-->
<!--★ポイント★-->
<font color="#FF0000">
ポイント:
<!--{if $arrProduct.price02_min == $arrProduct.price02_max}-->
<!--{$arrProduct.price02_min|sfPrePoint:$arrProduct.point_rate:$smarty.const.POINT_RULE:$arrProduct.product_id}-->
<!--{else}-->
<!--{if $arrProduct.price02_min|sfPrePoint:$arrProduct.point_rate:$smarty.const.POINT_RULE:$arrProduct.product_id == $arrProduct.price02_max|sfPrePoint:$arrProduct.point_rate:$smarty.const.POINT_RULE:$arrProduct.product_id}-->
<!--{$arrProduct.price02_min|sfPrePoint:$arrProduct.point_rate:$smarty.const.POINT_RULE:$arrProduct.product_id}-->
<!--{else}-->
<!--{$arrProduct.price02_min|sfPrePoint:$arrProduct.point_rate:$smarty.const.POINT_RULE:$arrProduct.product_id}-->?<!--{$arrProduct.price02_max|sfPrePoint:$arrProduct.point_rate:$smarty.const.POINT_RULE:$arrProduct.product_id}-->
<!--{/if}-->
<!--{/if}-->pt</font><br/>
<br/>
これでモバイルでもポイントが利用できるようになる。
最終更新:2009年05月07日 15:21