在 Magento 1.9 上找不到属性 "menutype" 的源模型 "megamenu/menutype"
Source model "megamenu/menutype" not found for attribute "menutype" on Magento 1.9
我们的网站基于 Magento 1。
我们安装了从 magestore 团队购买的 Mega 菜单扩展。
但是,当我们在后端管理设置中单击 catalog/Manage 类别时,出现此错误。
如何解决这个问题?
**There has been an error processing your request**
Source model "megamenu/menutype" not found for attribute "menutype"
/app/code/core/Mage/Eav/Model/Entity/Attribute/Abstract.php(386): Mage::exception('Mage_Eav', 'Source model "m...')
/app/code/core/Mage/Adminhtml/Block/Widget/Form.php(201): Mage_Eav_Model_Entity_Attribute_Abstract->getSource()
app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tab/Attributes.php(113): Mage_Adminhtml_Block_Widget_Form->_setFieldset(Array, Object(Varien_Data_Form_Element_Fieldset))
...
screenshot of error page
此问题已成功解决。
菜单类型与旧菜单类型冲突。
我们在我们的网站上使用了 Peerforest_Megamenu 扩展名。虽然我们禁用了旧的大型菜单扩展,但这个属性仍然保留在我们的数据库中。
所以,当我们安装名为 Magestore mega menu extension 的新扩展时,就出现了这个问题。
此外。 Peerforest_Megamenu 在类别 table 上创建了一些新属性,例如 megamenu/menutype,这些属性需要模型源来显示选项。
当我们禁用 Peerforest_Megamenu 时,他们再也找不到他们的模型来源了。
我刚刚为这些属性创建了一些新的模型源文件。
这是新的菜单类型代码块。
<?php
class Magestore_Megamenu_Model_Menutype extends
Mage_Eav_Model_Entity_Attribute_Source_Abstract
{
protected $_options = array();
public function getAllOptions()
{
$this->_options[] = array('value' => 'megamenu-horizontal','label' => 'Mega Menu');
$this->_options[] = array('value' => 'megamenu-vertical','label' => 'Vertical');
return $this->_options;
}
}
希望我的回答对大家有帮助。
谢谢您的考虑。
问候。
我们的网站基于 Magento 1。
我们安装了从 magestore 团队购买的 Mega 菜单扩展。
但是,当我们在后端管理设置中单击 catalog/Manage 类别时,出现此错误。
如何解决这个问题?
**There has been an error processing your request**
Source model "megamenu/menutype" not found for attribute "menutype"
/app/code/core/Mage/Eav/Model/Entity/Attribute/Abstract.php(386): Mage::exception('Mage_Eav', 'Source model "m...')
/app/code/core/Mage/Adminhtml/Block/Widget/Form.php(201): Mage_Eav_Model_Entity_Attribute_Abstract->getSource()
app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tab/Attributes.php(113): Mage_Adminhtml_Block_Widget_Form->_setFieldset(Array, Object(Varien_Data_Form_Element_Fieldset))
...
screenshot of error page
此问题已成功解决。 菜单类型与旧菜单类型冲突。 我们在我们的网站上使用了 Peerforest_Megamenu 扩展名。虽然我们禁用了旧的大型菜单扩展,但这个属性仍然保留在我们的数据库中。 所以,当我们安装名为 Magestore mega menu extension 的新扩展时,就出现了这个问题。
此外。 Peerforest_Megamenu 在类别 table 上创建了一些新属性,例如 megamenu/menutype,这些属性需要模型源来显示选项。
当我们禁用 Peerforest_Megamenu 时,他们再也找不到他们的模型来源了。 我刚刚为这些属性创建了一些新的模型源文件。 这是新的菜单类型代码块。
<?php
class Magestore_Megamenu_Model_Menutype extends
Mage_Eav_Model_Entity_Attribute_Source_Abstract
{
protected $_options = array();
public function getAllOptions()
{
$this->_options[] = array('value' => 'megamenu-horizontal','label' => 'Mega Menu');
$this->_options[] = array('value' => 'megamenu-vertical','label' => 'Vertical');
return $this->_options;
}
}
希望我的回答对大家有帮助。 谢谢您的考虑。 问候。