久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

Magento:在結帳時保存自定義地址屬性

Magento: save custom address attribute in checkout(Magento:在結帳時保存自定義地址屬性)
本文介紹了Magento:在結帳時保存自定義地址屬性的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

這是我在我的網站上所做的:管理->客戶->屬性->管理客戶地址屬性并添加一個新屬性,用戶可以在他/她的個人資料中看到它,在我的地址選項下,新屬性可以編輯并在創建新地址時保存,我也可以在后端看到它,并進行編輯,直到這里一切正常,我的問題出在結帳中,我已經在帳單和運輸中找到了該字段表單,我希望在用戶單擊下訂單"時保存新屬性;按鈕,但是,結帳似乎對新屬性一無所知,該屬性未保存,如果我從用戶配置文件中保存一個值,結帳不會將其加載到字段中.

This is what i did in my website: Admin->Customers->Attributes->Manage Customer Address Attributes and add a new attribute , the user can see it in his/her profile, under My Addresses option, the new attribute can be edited and is saved when creating a new address, i also can see it in the backend, and edited, until here everything is ok, my problem is in the checkout, i already have the field in the billing and shipping forms and i want the new attribute to be saved when the user click "Place Order" button, but, checkout seems it doesn't know nothing about the new attribute, the attribute is not saved and if i save one value from the user profile checkout doesn't load it in the field.

我可以在這里做什么??

what can i do here??

謝謝

推薦答案

在查看 Magento 的代碼并閱讀 wiki 后,我能夠完成它,我的新屬性保存在配置文件中的地址編輯表單中,但是當我在結帳表單中輸入它時沒有保存,那是因為我需要覆蓋一些 Magento 核心文件,第一步是將新屬性添加到 appcodecoreMageCustomeretcconfig.xml,我復制到 appcodecoreMycompanyCustomeretcconfig.xml,因為我的新屬性代碼是 rfc,我找到了 條目和

After looking in the Magento's code and reading the wiki, I was able to complete it, my new attribute was saved in the address edit form in the profile, but was not saved when I enter it in the checkout form, that was because I need to override some Magento core files, the first step was adding the new attribute to appcodecoreMageCustomeretcconfig.xml, I copied to appcodecoreMycompanyCustomeretcconfig.xml, as my new attribute code is rfc, I located the <fieldsets> entry and

<customer_dataflow>
    ....
    <rfc><billing>1</billing><shipping>1</shipping></rfc>
</customer_dataflow>

現在我需要將新屬性添加到 appcodecoreMageCustomerModelEntitySetup.php 我做了同樣的覆蓋,復制到我的本地命名空間,并在函數 getDefaultEntities() 中找到

now I need to add the new attribute to the appcodecoreMageCustomerModelEntitySetup.php i did the same to override, copied to my local namespace, and in the function getDefaultEntities() i locate the

'customer_address'=>array(
    ....
            'rfc' => array(
            'label'         => 'RFC',
            'required'      => false,
            'sort_order'    => 135,
    ),
)  

現在,我也需要在 appcodecoreMageSalesetcconfig.xml 中做同樣的事情,但現在應該看起來像這樣

now, I need to do also the same in appcodecoreMageSalesetcconfig.xml, but now should look like this

<sales_copy_order_billing_address>
    .....
    <rfc><to_order>*</to_order></rfc>
</sales_copy_order_billing_address>

<sales_copy_order_shipping_address>
    ......
    <rfc><to_order>*</to_order></rfc>
</sales_copy_order_shipping_address>

<sales_convert_quote_address>
    ........
    <rfc><to_order_address>*</to_order_address><to_customer_address>*</to_customer_address></rfc>
</sales_convert_quote_address>

<sales_convert_order_address>
    .........
    <rfc><to_quote_address>*</to_quote_address></rfc>
</sales_convert_order_address>

<customer_address>
    .......
    <rfc><to_quote_address>*</to_quote_address></rfc>
</customer_address>

希望能幫到別人

這篇關于Magento:在結帳時保存自定義地址屬性的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

Joining 2 tables in SELECT(MYSQL/PHP)(在 SELECT(MYSQL/PHP) 中加入 2 個表)
How to make lt;option selected=quot;selectedquot;gt; set by MySQL and PHP?(如何使lt;option selected=“selectedgt;由 MySQL 和 PHP 設置?)
Auto populate a select box using an array in PHP(使用 PHP 中的數組自動填充選擇框)
PHP SQL SELECT where like search item with multiple words(PHP SQL SELECT where like search item with multiple words)
json_encode produce JSON_ERROR_UTF8 from MSSQL-SELECT(json_encode 從 MSSQL-SELECT 產生 JSON_ERROR_UTF8)
MySQL ORDER BY rand(), name ASC(MySQL ORDER BY rand(),名稱 ASC)
主站蜘蛛池模板: 亚洲国产一区在线 | 亚洲一区国产精品 | 免费观看av网站 | 波波电影院一区二区三区 | 超碰av在线| 精品在线一区二区三区 | 精品久久不卡 | 一区在线观看 | 久久国产精品久久久久久 | 美女露尿口视频 | 精品一区二区久久久久久久网精 | 国产精品日韩欧美一区二区三区 | 亚洲天堂二区 | 久久精品一区二区 | www.jizzjizz | 一本色道精品久久一区二区三区 | 久久久一区二区三区四区 | h视频免费在线观看 | 懂色tv| 在线观看av网站永久 | 在线免费亚洲视频 | 精品国产一区二区三区四区在线 | 国产日韩一区二区三区 | 欧美在线色 | 中文字幕国产高清 | 精品一区二区三区不卡 | 精品一区二区久久久久久久网站 | 欧美啪啪 | 亚洲精品久久久久久国产精华液 | 伊人狠狠 | 国产精品久久久久一区二区三区 | 国产精品中文字幕在线 | 日韩国产一区二区三区 | 国产精品91久久久久久 | 成人小视频在线观看 | 亚洲精品久久久久久久久久久 | 韩国av一区二区 | 久久精品亚洲欧美日韩久久 | 99一区二区 | 欧美成年黄网站色视频 | 国产精品久久久久久久久久久久久 |