【问题标题】:Source model "megamenu/menutype" not found for attribute "menutype" on Magento 1.9在 Magento 1.9 上找不到属性“menutype”的源模型“megamenu/menutype”
【发布时间】:2017-05-02 13:45:42
【问题描述】:

我们的网站基于 Magento 1。

我们安装了从 magestore 团队购买的 Mega 菜单扩展。

但是,当我们点击后台管理设置中的目录/管理类别时,我们得到了这个错误。

如何解决这个问题?

 **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

【问题讨论】:

    标签: magento attributes categories megamenu


    【解决方案1】:

    此问题已成功解决。 Menutype 与旧的相冲突。 我们在我们的网站上使用了 Peerforest_Megamenu 扩展。虽然我们禁用了旧的大型菜单扩展,但这个属性仍然保留在我们的数据库中。 因此,当我们安装名为 Magestore mega menu extension 的新扩展时,就出现了这个问题。

    此外。 Peerforest_Megamenu 在类别表上创建了一些新属性,例如 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;
           }
    
       }
    

    希望我的回答对其他人有所帮助。 谢谢您的考虑。 问候。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-12-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-07-31
      • 2015-08-16
      相关资源
      最近更新 更多