クーポン(部分テンプレート)
注文情報入力画面で利用するクーポン情報用部分テンプレートです。
注文情報入力画面で include して利用します。(注文情報入力画面以外では利用できません)
テーマ管理のファイルパス
ec_force/shop/orders/_view_coupon.html.liquid
ec_force/shop/orders/_view_coupon.html+smartphone.liquid
必要なコンポーネント
任意とあるもの以外はシステム上必要なコンポーネントとなりますので、必ず使用するようにしてください。
<!-- 部分テンプレート(クーポンの入力) -->
<div id='view-coupon'>
<!-- クーポンの入力 -->
{% if shop_form_settings['coupon'] %}
<!-- クーポンコードの取得 -->
{% assign coupon_code = '' %}
{% if order.coupon.code != blank %}
{% assign coupon_code = order.coupon.code %}
{% elsif order.coupon_code != blank %}
{% assign coupon_code = order.coupon_code %}
{% endif %}
<label>クーポンコード</label>
<!-- 利用可能クーポン一覧(PC用) -->
{% include 'ec_force/shop/shared/available_coupon_list.html', times: order.times %}
<!-- 利用可能クーポン一覧(スマートフォン用) -->
{% include 'ec_force/shop/shared/available_coupon_list.html+smartphone', times: order.times %}
{% if view_available_coupon_list %}
<label>クーポンコードを入力してください。</label>
<input id='input_coupon_code' name="order[coupon_code]" value="{{ coupon_code }}">
{% else %}
<input id='input_coupon_code' name="order[coupon_code]" value="{{ coupon_code }}">
{% endif %}
{% endif %}
</div>