ショッピングカート (テンプレートリファレンス)/ref_temp/record/rv_contents_ecs_cart
定数
| サイト定数 | |||||||||
|---|---|---|---|---|---|---|---|---|---|
| $site | . | title | サイトタイトル | ||||||
| . | description | 概要 | |||||||
| . | keywords | キーワード | |||||||
| . | robots | 検索エンジンロボット制御 | |||||||
| . | header_logo | ヘッダーロゴ画像URL | |||||||
| . | footer_text | フッター文 | |||||||
| . | favicon | faviconURL | |||||||
| ウィジェット定数 | |||||||||
| $widgets | . | {ウィジェットID} | ウィジェット | ||||||
| ダッシュボード定数 | |||||||||
| $dashbords | . | {ダッシュボードID} | ダッシュボード | ||||||
| ログインメンバー定数 | |||||||||
| $members | . | {メンバーインスタンスID} | . | refid | メンバーID | ||||
| . | resource_type | リソースタイプ | |||||||
| . | url | メンバーURL | |||||||
| . | url_path | メンバーURLパス | |||||||
| . | login_id | ログインID | |||||||
| . | contents | . | {フィールドID} | メンバーコンテンツ | |||||
| 所属グループ | |||||||||
| . | groups | . | {i} | . | refid | グループID | |||
| . | name | グループ名 | |||||||
| . | created | 作成日時 | |||||||
| . | last_logined | 最終ログイン日時 | |||||||
プロトタイプ
<div class="jumbotron">
<h2>{?$page.title?}</h2>
</div>
<div class="panel panel-default col-xs-10 col-xs-offset-1">
<div class="panel-body">
<form action="{?$page.action?}" method="post">
{?if $page.error == 1?}
<div class="alert alert-danger">在庫がありません.</div>
{?elseif $page.error == 2?}
<div class="alert alert-danger">値が不正です.</div>
{?elseif $page.error == 3?}
<div class="alert alert-danger">カートが空です.</div>
{?/if?}
<table class="table">
<thead>
<tr>
<th>商品名</th>
<th>単価</th>
<th>数量</th>
<th>小計</th>
<th>削除</th>
</tr>
</thead>
<tbody>
{?foreach from=$page.cart item=value?}
<tr>
<td>{?$value.record.title?} {?$value.name?}</td>
<td>¥{?$value.price|number_format?}</td>
<td><input type="text" name="data[cnt][{?$value.id?}]" value="{?$value.cnt?}" size="4" /></td>
<td>¥{?$value.subtotal_price|number_format?}</td>
<td><a href="?delete={?$value.id?}">削除</a></td>
</tr>
{?/foreach?}
<tr>
<td colspan="5" id="change_cnt" class="text-right"><input type="submit" value="数量変更" class="btn btn-default" /></td>
</tr>
<tr>
<td colspan="5" id="subtotal_price" class="text-right"><label>小計:</label>¥{?$page.subtotal_price|number_format?}</td>
</tr>
</tbody>
</table>
<div class="form-group">
<div class="text-center">
<button type="button" class="btn btn-primary btn-lg" onclick="location.href='{?$page.order_url?}'">注文画面へ進む</button>
</div>
</div>
</form>
</div>
</div>
