0
我嘗試更新我的自定義模型,將兩個新屬性添加到我的模型中。AddAttribute error
我修改了config.xml中文件中添加版本0.0.2和我創建稱爲SQL文件夾的新PHP文件mysql4升級,0.0.1-0.0.2.php
該文件被正確執行,但Magento的生成包含一個通用的錯誤,即報告錯誤「在文件錯誤...」
下面你可以找到我的代碼:
<?php
$installer = $this;
$installer->startSetup();
$installer->addAttribute("configurador/vista", "radiovertical", array(
"type" => "dec",
"backend" => "",
"frontend" => "",
"label" => "Radio Vertical",
"input" => "text",
"class" => "",
"source" => "",
"global" => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
"visible" => true,
"required" => true,
"user_defined" => false,
"default" => "",
"searchable" => false,
"filterable" => false,
"comparable" => false,
"visible_on_front" => false,
"unique" => false,
"note" => ""
));
$installer->addAttribute("configurador/vista", "radiohorizontal", array(
"type" => "dec",
"backend" => "",
"frontend" => "",
"label" => "Radio horizontal",
"input" => "text",
"class" => "",
"source" => "",
"global" => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
"visible" => true,
"required" => true,
"user_defined" => false,
"default" => "",
"searchable" => false,
"filterable" => false,
"comparable" => false,
"visible_on_front" => false,
"unique" => false,
"note" => ""
));
$installer->endSetup();
有人可以說我做錯了什麼嗎?
在此先感謝
您的型號是EAV還是flat? – Marius