【问题标题】:How to add new custom field in Magento 1 customer address如何在 Magento 1 客户地址中添加新的自定义字段
【发布时间】:2018-02-25 23:15:42
【问题描述】:

我们已经尝试了这个answer 它对客户编辑表单都很好, 但现在的问题是,

我们使用了magestore onestepcheckout,

我们也添加了

<li>
                <div class="one-field">
                    <input onkeyup="validateElement(this.id)" type="text"
                               title="<?php echo Mage::helper('core')->quoteEscape($this->__('Govt ID')) ?>"
                               name="billing[govt_id]" id="billing:govt_id"
                               value="380051"
                               class="input-text"
                               required/>
                    <span class="highlight"></span>
                    <span class="bar"></span>
                    <label class="required" for="billing:govt_id"><?php echo $this->__('Govt ID') ?> <em>*</em></label>
                </div>
            </li>

另外,我们添加了,

'govt_id' => Mage::helper('onestepcheckout')->__('Govt Id'),

在position.php 页面中

但是,知道这个新添加的govt_id 的计费时间值没有被保存。

【问题讨论】:

  • 您找到解决方案了吗? @SagarPPanchal

标签: php magento onestepcheckout


【解决方案1】:

要添加新的地址字段,您需要创建一个新的扩展。

这里是在客户地址中添加Govt Id 的分步指南:http://excellencemagentoblog.com/blog/2011/11/29/magento-adding-custom-field-to-customer-address/

希望对你有帮助:)

【讨论】:

    猜你喜欢
    • 2023-03-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多