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()));
    }

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

posted on 2013-01-05 18:29  九九艳阳天  阅读(196)  评论(0编辑  收藏  举报

导航