我想在Magentos產品/自定義選項區域中構建自定義輸入字段。我開始寫一個新的模塊。 在 「等/模塊」 我創建 「Pi_Customize.xml」Magento無效塊類型
<?xml version="1.0"?>
<config>
<modules>
<Pi_Customize>
<active>true</active>
<codePool>local</codePool>
</Pi_Customize>
</modules>
</config>
在 「應用程序/代碼/本地/ etc」 我創建了 「config.xml中」
<?xml version="1.0"?>
<config>
<modules>
<Pi_Customize>
<version>0.1</version>
</Pi_Customize>
</modules>
<global>
<catalog>
<product>
<options>
<custom>
<groups>
<custom translate="label" module="customize">
<label>Custom Stuff</label>
<render>customize/adminhtml_catalog_product_edit_tab_options_type_custom</render>
<types>
<custom_type translate="label" module="customize">
<label>Custom Text</label>
</custom_type>
</types>
</custom>
</groups>
</custom>
</options>
</product>
</catalog>
</global>
</config>
當我在重新加載後端/產品/自定義選項中我看到新添加的字段,但我得到一個錯誤:
exception 'Mage_Core_Exception' with message 'Invalid block type: Mage_Customize_Block_Adminhtml_Catalog_Product_Edit_Tab_Options_Type_custom' in /home/michi/www/magento/app/Mage.php:595
我試圖約4小時左右,而不能讓它TOR工作。爲什麼Magento試圖加載「mage」而不是「pi/customize」。文件夾結構應該如何看起來像? B:「Block/catalog ...」
C:另一個?
同樣的錯誤也。 Magento也將這些標籤作爲類名的一部分。當我刪除標籤時,它工作正常。錯誤是:異常'Mage_Core_Exception'帶有消息'無效塊類型: Kaushikamdotcom_Pay_Block_History 'in /var/www/kaushikam/magento/app/Mage.php:595 – kaushik