2013-11-09 29 views

回答

14

<fieldsets> *標籤通常只能在​​3210文件中找到。

<fieldsets>標記主要用於定義在轉換對象時將哪些字段(屬性)複製到其中的位置,例如,在quoteorder轉換。

app/code/core/Mage/Sales/etc/config.xml摘錄:

<config> 
    <!-- : --> 
    <global> 
     <!-- : --> 
     <fieldsets> 
      <!-- : --> 
      <sales_convert_quote> 
       <remote_ip> 
        <to_order>*</to_order> 
       </remote_ip> 
       <x_forwarded_for> 
        <to_order>*</to_order> 
       </x_forwarded_for> 
       <customer_id> 
        <to_order>*</to_order> 
       </customer_id> 
       <customer_email> 
        <to_order>*</to_order> 
       </customer_email> 
       <!-- : --> 
       <items_qty> 
        <to_order>total_qty_ordered</to_order> 
       </items_qty> 
      </sales_convert_quote> 
      <!-- : --> 
     </fieldsets> 
     <!-- : --> 
    </global> 
    <!-- : --> 
</config> 

此外,<fieldsets>標籤被用來定義其是在導入/經由Magento的數據流出口的產品或客戶要分析/轉換的領域。

編輯:

<fieldsets>自動從一個表傳輸數據的另一張表?

號他們只是定義什麼將被複制到其中特定方面。

掃描Magento來源Mage::helper('core')->copyFieldset()發生的事情,看看實際的複製過程是怎樣的。

分別爲客戶/產品數據流掃描Mage::getConfig()->getFieldset()調用。


*注意<fieldsets>s。這是關於HTML <fieldset>標記的而不是

+0

自動將數據從一個表傳輸到另一個表? –