您是否配置 Magento 将新属性从报价转换为订单?如果您config.xml
从Mage_Sales
模块中检查并搜索sales_convert_quote_payment
. 您会看到如下内容:
<sales_convert_quote_payment>
<method><to_order_payment>*</to_order_payment></method>
<additional_data><to_order_payment>*</to_order_payment></additional_data>
<additional_information><to_order_payment>*</to_order_payment></additional_information>
<po_number><to_order_payment>*</to_order_payment></po_number>
<cc_type><to_order_payment>*</to_order_payment></cc_type>
<cc_number_enc><to_order_payment>*</to_order_payment></cc_number_enc>
<cc_last4><to_order_payment>*</to_order_payment></cc_last4>
<cc_owner><to_order_payment>*</to_order_payment></cc_owner>
<cc_exp_month><to_order_payment>*</to_order_payment></cc_exp_month>
<cc_exp_year><to_order_payment>*</to_order_payment></cc_exp_year>
<cc_number><to_order_payment>*</to_order_payment></cc_number>
<cc_cid><to_order_payment>*</to_order_payment></cc_cid>
<cc_ss_issue><to_order_payment>*</to_order_payment></cc_ss_issue>
<cc_ss_start_month><to_order_payment>*</to_order_payment></cc_ss_start_month>
<cc_ss_start_year><to_order_payment>*</to_order_payment></cc_ss_start_year>
</sales_convert_quote_payment>
Magento 使用这些fieldsets
在实体之间传输数据。在这种情况下从quote_payment
到order_payment
。
由于所有配置 XML 都合并到一大堆 XML 中,因此您可以从自己的模块 config.xml 添加其他节点。就像是:
<global>
<fieldsets>
<sales_convert_quote_payment>
<your_attribute><to_order_payment>*</to_order_payment></your_attribute>
</sales_convert_quote_payment>
</fieldsets>
</global>
希望这可以帮助您开始。