zoukankan      html  css  js  c++  java
  • magento学习2

         今天继续研究magento。在后台管理的时候出现个问题。

         Fatal error: Call to undefined method Mage_Adminhtml_Block_Widget::getrowurl()    C:\wamp\www\magentozn\app\code\core\Mage\Adminhtml\Block\Widget\Grid.php on line 1622

         到网上一搜,解决方法倒是有不少,都试了一下,这个问题都可以解决,但是有的可能对系统其它操作有影响。暂记下,待以后研究。

         solution 1:

         进入app/code/core/Mage/Adminhtml/Block/Widget/Grid.php
         Search function getRowUrl in the file.
         将
         public function getRowUrl($item)
         {
         $res = parent::getRowUrl($item);
         return ($res ? $res : '#');
         }
         替换成
         public function getRowUrl($item)
        {
        $res = parent::getUrl($item);
        return ($res ? $res : '#');
        }
     
        solution 2:
        //public function getRowUrl($item)
        //    {
        //       $res = parent::getRowUrl($item);
       //       return ($res ? $res : '#');
       //   }
       还是那个函数,注释掉。
     
       solution 3:

       修改 app/code/core/Mage/Core/Block/Template.php 这个文件,在319行后面加入函数getRowUrl,如:

       public function getRowUrl($row)
        {
        return $this->getUrl('*/*/edit', array('instance_id' => $row->getId()));
        }

        以上三个方法都暂时解决目前的这个问题,我用了第三个。等以后代码熟悉了,在后头看这个问题。

  • 相关阅读:
    jquery操作select
    EL表达式
    八大排序算法之希尔排序
    八大排序算法之堆排序
    八大排序算法之归并排序
    yield与send实现协程操作
    详解生成器、迭代器
    类相关知识
    python装饰器大详解
    详解python之反射机制
  • 原文地址:https://www.cnblogs.com/chenxl/p/2846534.html
Copyright © 2011-2022 走看看