2023/01/18更新
+ 追加した行
- 削除した行
顧客カスタム項目をマイページでも表示・編集できるように
カスタム項目 (opens in a new tab) はオプション機能です。
ご利用には別途お申し込みが必要です。
mypage > 会員情報変更画面
ec_force/shop/customer/base/edit.html.liquid
ec_force/shop/customer/base/edit.html+smartphone.liquid
+ <!-- カスタム項目 -->
+ <!-- id,class,data属性等はJSで制御する際に必要なので変更不可 -->
+ <div id="view-free_columns">
+ {% if base_info.use_free_columns? and base_info.use_free_columns_mypage and liquid_custom_field %}
+ <!-- カスタム項目タイトル名 -->
+ {{ base_info.free_columns_title }}
+ {% for custom_info_hash in liquid_custom_field %}
+ <div id="category-{{ custom_info_hash[0] }}" class="category-wrapper">
+ {% for seq_hash in custom_info_hash[1] %}
+ {% assign info = seq_hash[1] %}
+ <div id="category-{{ custom_info_hash[0] }}-{{ seq_hash[0] }}" class="category-container">
+ {% if info['category'] %}
+ <!-- カテゴリ名 -->
+ {{ info['category'] }}
+ {% if info['category_multiple_answer'] %}
+ <!-- カテゴリ削除ボタン -->
+ <div class="category-minus" data-id="{{ custom_info_hash[0] }}" data-seq="{{ seq_hash[0] }}" style="display: none;">
+ 削除<!-- 文字の変更可 -->
+ </div>
+ {% endif %}
+ {% endif %}
+ {% for i_hash in info['info'] %}
+ {% assign i = i_hash[1] %}
+ {% if i['required'] %}{% assign required_class = "validate[required]" %}{% else %}{% assign required_class = "" %}{% endif %}
+ <!-- 入力項目 -->
+ <div>
+ <label for="customer_free_columns_{{ custom_info_hash[0] }}_{{ seq_hash[0] }}_{{ i['free_column_id'] }}">
+ <!-- 入力項目名 -->
+ {{ i['label'] }}
+ {% if i['required'] %} ※<!-- 必須。文字の変更可 --> {% endif %}
+ </label>
+ <!-- 入力項目形式 -->
+ {% if i['minlength'] %}{% assign min = i['minlength'] %}{% else %}{% assign min = '' %}{% endif %}
+ {% if i['maxlength'] %}{% assign max = i['maxlength'] %}{% else %}{% assign max = '' %}{% endif %}
+ {% case i['type'] %}
+ {% when 'EcForce::FreeColumn::Textarea' %}
+ {% for v in i['value'] %}
+ {% if i['is_valid_format'] == true %}{% assign value = v %}{% else %}{% assign value = '' %}{% endif %}
+ <textarea class="free_columns validate[minSize[{{ min }}],maxSize[{{ max }}]] send_feedback_maxlength {{ required_class }}" data-id="{{ i['free_column_id'] }}" data-prompt-position="topLeft" placeholder="{{ i['placeholder'] }}" rows="5" maxlength="{{ max }}" name="customer[free_columns][{{ custom_info_hash[0] }}][{{ seq_hash[0] }}][{{ i['free_column_id'] }}]" id="customer_free_columns_{{ custom_info_hash[0] }}_{{ seq_hash[0] }}_{{ i['free_column_id'] }}">{{ value }}</textarea>
+ {% endfor %}
+ {% when 'EcForce::FreeColumn::Input' %}
+ {% for v in i['value'] %}
+ {% if i['is_valid_format'] == true %}{% assign value = v %}{% else %}{% assign value = '' %}{% endif %}
+ {% case i['input_type_name'] %}
+ {% when 'メール' %}
+ <input type="email" class="free_columns validate[custom[email],minSize[{{ min }}],maxSize[{{ max }}]] {{ required_class }}" data-id="{{ i['free_column_id'] }}" data-prompt-position="topLeft" value="{{ value }}" placeholder="{{ i['placeholder'] }}" name="customer[free_columns][{{ custom_info_hash[0] }}][{{ seq_hash[0] }}][{{ i['free_column_id'] }}]" id="customer_free_columns_{{ custom_info_hash[0] }}_{{ seq_hash[0] }}_{{ i['free_column_id'] }}" maxlength="{{ max }}" size="{{ max }}">
+ {% when '日付' %}
+ <input type="text" class="free_columns datepicker validate[minSize[{{ min }}],maxSize[{{ max }}],custom[date]] {{ required_class }}" data-id="{{ i['free_column_id'] }}" data-prompt-position="topLeft" value="{{ value }}" placeholder="{{ i['placeholder'] }}" name="customer[free_columns][{{ custom_info_hash[0] }}][{{ seq_hash[0] }}][{{ i['free_column_id'] }}]" id="customer_free_columns_{{ custom_info_hash[0] }}_{{ seq_hash[0] }}_{{ i['free_column_id'] }}" maxlength="{{ max }}" size="{{ max }}">
+ {% when '数字' %}
+ <input type="tel" class="free_columns validate[custom[integer],min[{{ min }}],max[{{ max }}]] {{ required_class }}" data-id="{{ i['free_column_id'] }}" data-prompt-position="topLeft" value="{{ value }}" placeholder="{{ i['placeholder'] }}" name="customer[free_columns][{{ custom_info_hash[0] }}][{{ seq_hash[0] }}][{{ i['free_column_id'] }}]" id="customer_free_columns_{{ custom_info_hash[0] }}_{{ seq_hash[0] }}_{{ i['free_column_id'] }}" maxlength="{{ max }}" size="{{ max }}">
+ {% when 'テキスト' %}
+ <input type="text" class="free_columns validate[minSize[{{ min }}],maxSize[{{ max }}]] {{ required_class }}" data-id="{{ i['free_column_id'] }}" data-prompt-position="topLeft" value="{{ value }}" placeholder="{{ i['placeholder'] }}" name="customer[free_columns][{{ custom_info_hash[0] }}][{{ seq_hash[0] }}][{{ i['free_column_id'] }}]" id="customer_free_columns_{{ custom_info_hash[0] }}_{{ seq_hash[0] }}_{{ i['free_column_id'] }}" maxlength="{{ max }}" size="{{ max }}">
+ {% endcase %}
+ {% endfor %}
+ {% else %}
+ {% assign free_column_options = i['options'] %}
+ {% case i['type'] %}
+ {% when 'EcForce::FreeColumn::Checkbox' %}
+ <input class="free_columns" data-id="{{ i['free_column_id'] }}" data-prompt-position="topLeft" name="customer[free_columns][{{ custom_info_hash[0] }}][{{ seq_hash[0] }}][{{ i['free_column_id'] }}][]" type="hidden">
+ {% for option in free_column_options %}
+ {% if option['default'] == true %}{% assign default = '1' %}{% else %}{% assign default = '0' %}{% endif %}
+ {% if i['value'] contains option['value'] %}{% assign checked = 'checked="checked"' %}{% else %}{% assign checked = "" %}{% endif %}
+ {% if i['value'].size == 1 and i['value'][0] == '' and option['default'] == true %}{% assign checked = 'checked="checked"' %}{% elsif i['is_valid_format'] == false and option['default'] == true %}{% assign checked = 'checked="checked"' %}{% endif %}
+ <input class="free_columns {{ required_class }}" data-id="{{ i['free_column_id'] }}" data-prompt-position="topLeft" data-default="{{ default }}" type="checkbox" value="{{ option['key'] }}" {{ checked }} name="customer[free_columns][{{ custom_info_hash[0] }}][{{ seq_hash[0] }}][{{ i['free_column_id'] }}][]" id="customer_free_columns_{{ custom_info_hash[0] }}_{{ seq_hash[0] }}_{{ i['free_column_id'] }}_{{ option['key'] }}">
+ <label for="customer_free_columns_{{ custom_info_hash[0] }}_{{ seq_hash[0] }}_{{ i['free_column_id'] }}_{{ option['key'] }}">{{ option['value'] }}</label>
+ {% endfor %}
+ {% when 'EcForce::FreeColumn::Radio' %}
+ {% if i['required'] %}
+ <input class="free_columns" data-id="{{ i['free_column_id'] }}" data-prompt-position="topLeft" type="hidden" name="customer[free_columns][{{ custom_info_hash[0] }}][{{ seq_hash[0] }}][{{ i['free_column_id'] }}]">
+ {% else %}
+ <input class="free_columns {{ required_class }}" data-id="{{ i['free_column_id'] }}" data-prompt-position="topLeft" data-default="0" type="radio" value="" checked="checked" name="customer[free_columns][{{ custom_info_hash[0] }}][{{ seq_hash[0] }}][{{ i['free_column_id'] }}]" id="customer_free_columns_{{ custom_info_hash[0] }}_{{ seq_hash[0] }}_{{ i['free_column_id'] }}_">
+ <label for="customer_free_columns_{{ custom_info_hash[0] }}_{{ seq_hash[0] }}_{{ i['free_column_id'] }}_">未設定</label>
+ {% endif %}
+ {% for option in free_column_options %}
+ {% if option['default'] == true %}{% assign default = '1' %}{% else %}{% assign default = '0' %}{% endif %}
+ {% if i['value'] contains option['value'] %}{% assign checked = 'checked="checked"' %}{% else %}{% assign checked = "" %}{% endif %}
+ {% if i['value'].size == 1 and i['value'][0] == '' and option['default'] == true %}{% assign checked = 'checked="checked"' %}{% elsif i['is_valid_format'] == false and option['default'] == true %}{% assign checked = 'checked="checked"' %}{% endif %}
+ <input class="free_columns {{ required_class }}" data-id="{{ i['free_column_id'] }}" data-prompt-position="topLeft" data-default="{{ default }}" type="radio" value="{{ option['key'] }}" {{ checked }} name="customer[free_columns][{{ custom_info_hash[0] }}][{{ seq_hash[0] }}][{{ i['free_column_id'] }}]" id="customer_free_columns_{{ custom_info_hash[0] }}_{{ seq_hash[0] }}_{{ i['free_column_id'] }}_{{ option['key'] }}">
+ <label for="customer_free_columns_{{ custom_info_hash[0] }}_{{ seq_hash[0] }}_{{ i['free_column_id'] }}_{{ option['key'] }}">{{ option['value'] }}</label>
+ {% endfor %}
+ {% else %}
+ {% if i['multiple_flag'] %}{% assign multiple = 'multiple="multiple"' %}{% else %}{% assign multiple = '' %}{% endif %}
+ {% if i['multiple_flag'] %}
+ <input class="free_columns" data-id="{{ i['free_column_id'] }}" data-prompt-position="topLeft" name="customer[free_columns][{{ custom_info_hash[0] }}][{{ seq_hash[0] }}][{{ i['free_column_id'] }}][]" type="hidden">
+ {% endif %}
+ <select {{ multiple }} class="free_columns {{ required_class }}" data-id="{{ i['free_column_id'] }}" data-prompt-position="topLeft" style="resize: vertical;" name="customer[free_columns][{{ custom_info_hash[0] }}][{{ seq_hash[0] }}][{{ i['free_column_id'] }}][]" id="customer_free_columns_{{ custom_info_hash[0] }}_{{ seq_hash[0] }}_{{ i['free_column_id'] }}">
+ {% unless i['multiple_flag'] %}
+ <option data-default="0" value="{{ option['key'] }}">未設定</option>
+ {% endunless %}
+ {% for option in free_column_options %}
+ {% if option['default'] == true %}{% assign default = '1' %}{% else %}{% assign default = '0' %}{% endif %}
+ {% if i['value'] contains option['value'] %}{% assign selected = 'selected="selected"' %}{% else %}{% assign selected = "" %}{% endif %}
+ {% if i['value'].size == 1 and i['value'][0] == '' and option['default'] == true %}{% assign selected = 'selected="selected"' %}{% elsif i['is_valid_format'] == false and option['default'] == true %}{% assign selected = 'selected="selected"' %}{% endif %}
+ <option data-default="{{ default }}" value="{{ option['key'] }}" {{ selected }}>{{ option['value'] }}</option>
+ {% endfor %}
+ </select>
+ {% endcase %}
+ {% endcase %}
+ {% if i['maxlength'] and i['type'] == 'EcForce::FreeColumn::Textarea' %}
+ <!-- 残り文字数 -->
+ 残り<!-- 文字の変更可 -->
+ <span data-feedback-maxlength="customer_free_columns_{{ custom_info_hash[0] }}_{{ seq_hash[0] }}_{{ i['free_column_id'] }}"></span>
+ 文字<!-- 文字の変更可 -->
+ {% endif %}
+ </div>
+ {% endfor %}
+ {% if info['category'] and info['category_multiple_answer'] %}
+ <!-- カテゴリ追加ボタン -->
+ <div class="category-plus" data-id="{{ custom_info_hash[0] }}" data-seq="{{ seq_hash[0] }}" style="display: none;">
+ <div>入力欄追加<!-- 文字の変更可 --></div>
+ </div>
+ {% endif %}
+ </div>
+ {% endfor %}
+ </div>
+ {% endfor %}
+ {% endif %}
+ </div>
<!-- 送信ボタン -->
ポイント交換機能
ポイント交換機能 (opens in a new tab) はオプション機能です。
ご利用には別途お申し込みが必要です。
mypage > 定期注文詳細画面 商品情報
ec_force/shop/customer/subs_orders/order_items/index.html.liquid
ec_force/shop/customer/subs_orders/order_items/index.html+smartphone.liquid
<!-- ポイント商品交換予約 -->
-{% if base_info.use_point? and base_info.exchange_items_with_points? and subs_order.active? %}
+{% if base_info.use_point? and base_info.exchange_items_with_points? and base_info.variant_point_exchange_on_mypage? and subs_order.active? %}