説明
カートの中の商品合計額に対しての消費税額を算出します。値引き、送料・手数料等は含まれません。
使い方
<?php $tax = usces_cart_tax( 'return' ); ?>
パラメータ
- $out
- (文字列)戻り値の出力を echo するか return するかを決める。初期値は空文字(echo)。
- ‘return’:return する
- ”(空文字)もしくは未設定:echo する(初期値)
戻り値
- (数値)
- 消費税額
注意
カートページで利用する際には、カートテーブルに合わせて html の調整が必要です。
用例
<tr>
<th class="num"></th>
<th class="thumbnail"></th>
<th colspan="3" scope="row" class="aright">
<?php _e( 'consumption tax', 'usces' );//消費税 ?>
</th>
<th class="aright amount">
<?php usces_crform( usces_cart_tax( 'return' ), true, false ); ?>
</th>
<th class="stock"></th>
<th class="action"></th>
</tr>
ソースファイル
usc-e-shop/functions/template_func.php
関連資料
- usces_the_taxrate() ・・・ 商品の税率を表示します。
- usces_confirm_tax() ・・・ 内容確認ページで、税率ごとの対象金額・消費税額を表示します。
- usces_the_itemPrice_taxincluded() ・・・ 商品単価(売価)に消費税額を加算した金額を取得する
- usces_the_itemCprice_taxincluded() ・・・ 商品単価(通常価)に消費税額を加算した金額を表示
- usces_the_itemPriceCr_taxincluded() ・・・ 商品単価(売価)に消費税額を加算した金額を、通貨記号付きで表示
- usces_the_itemCpriceCr_taxincluded() ・・・ 商品単価(通常価)に消費税額を加算した金額を、通貨記号付きで表示
PAGE TOP