【问题标题】:Display Telephone field on create account page in magento 2在 magento 2 的创建帐户页面上显示电话字段
【发布时间】:2016-09-27 00:02:30
【问题描述】:

我想在创建帐户页面上显示电话字段以及名字和姓氏。电话字段映射到地址字段,因此不能单独显示电话字段并隐藏其他地址字段。 帮助我只显示电话字段而不是地址字段。

【问题讨论】:

    标签: magento-2.0


    【解决方案1】:

    用上面给出的代码替换下面的 html 文件:- "vendor\magento\module-checkout\view\frontend\web\template\shipping-address\address-renderer\default.html

    <!--
    /**
     * Copyright © 2016 Magento. All rights reserved.
     * See COPYING.txt for license details.
     */
    -->
    <div class="shipping-address-item" data-bind="css: isSelected() ? 'selected-item' : 'not-selected-item'">
        <!-- ko text: address().firstname --><!-- /ko --> <!-- ko text: address().lastname --><!-- /ko --><br/>
         <!-- ko text: address().telephone --><!-- /ko --><br/>
        <!-- ko if: (address().isEditable()) -->
        <button type="button"
                class="action edit-address-link"
                data-bind="click: editAddress, visible: address().isEditable()">
            <span data-bind="i18n: 'Edit'"></span>
        </button>
        <!-- /ko -->
        <button type="button" data-bind="click: selectAddress" class="action action-select-shipping-item">
            <span data-bind="i18n: 'Ship Here'"></span>
        </button>
    </div>

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-03-24
      • 1970-01-01
      • 1970-01-01
      • 2017-02-04
      • 1970-01-01
      相关资源
      最近更新 更多