简体   繁体   English

如何在Magento 1客户地址中添加新的自定义字段

[英]How to add new custom field in Magento 1 customer address

We have tried this answer its all working good for customer edit form, but now the issue is, 我们已经尝试过此答案,它对客户编辑表单都非常有用,但是现在的问题是,

we have used magestore onestepcheckout, 我们已经使用了magestore onestepcheckout,

also we have added 我们也添加了

<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>

also, we have added, 另外,我们添加了

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

in the position.php page position.php页面中

but, know while time of billing value of this newly added govt_id is not being saved. 但是,知道此新添加的govt_id的计费值的时间未保存。

For add new address field, you need to create a new extension. 要添加新地址字段,您需要创建一个新的扩展名。

Here, Step-by-step guide for add Govt Id in customer address: http://excellencemagentoblog.com/blog/2011/11/29/magento-adding-custom-field-to-customer-address/ 在这里,有关在客户地址中添加Govt Id的分步指南: http : //excellencemagentoblog.com/blog/2011/11/29/magento-adding-custom-field-to-customer-address/

Hope it helps you:) 希望对您有帮助:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM