ปิด Notification Message ในหน้า admin ของ magento

magento

เมื่อ magento มีการอัพเดทเวอร์ชั่นใหม่ขึ้นมาก็จะมีข้อความเตือนเราทุกครั้งที่ login เข้าหน้า admin ทำให้ผมก็เกิดความรำคาญที่ว่า ไม่อยากอัพเดทอะเตือนอยู่ได้ – - เลยไปหาวิธีปิดซะเลย

ให้เราไปที่ไฟล์ app/code/core/Mage/Adminhtml/Block/Notification/toolbar.php หาโค็ดดังนี้

public function isShow()
{
if ($this->getRequest()->getControllerName() == ‘notification’) {
return false;
}
if ($this->getCriticalCount() == 0 && $this->getMajorCount() == 0 && $this->getMinorCount() == 0 && $this->getNoticeCount() == 0) {
return false;
}
return true;
}

แก้เป็น

public function isShow()
{
return false;
}

เพียงเท่านี้ก็จะไม่มีข้อความมากวนใจเราอีกแล้ว…

อ้างอิง : http://www.casualcommerce.com/2009/02/annoying-notification-message-in-the-admin-page/

บทความแนะนำ
  • Tanin N

    ขอบคุณครับ..หามานานแล้ว

blog comments powered by Disqus