Magento: change default phone numbers before site launch

Magento Error: change default phone numbers before site launch

By Jonathan on

We’ve come across this Magento error a few times in the past since the latest update to version At first the message: “Reminder: Change Magento`s default phone numbers and callouts before site launch” Does not act like an error, it is only when we go to delete/read the message we see that the message still remains and a the same message then reappears unread.

The reason this occurs is because there is no ‘link’ tag within the notifications.rss, unlike all of the other notifications. When the user views their messages Magento checks the table ‘adminnotification_inbox’ to see if the columns ‘is_read’, ‘is_removed’ and ‘url’ have been updated. In this case the ‘url’ column is updated with NULL when read. When Magento checks the database for messages it checks to see if there is an item already based on it’s url. Furthermore, if the the url matches it will not be inserted into the database. However when the field is null, like in this case, the code will fail and the same notification will be inserted into the table.

There is a fairly simple solution to fix this. You must have access to the Magento core files to fix this.

Firstly make a copy of the file app/code/core/Mage/AdminNotification/Model/Resource/Inbox.php to your desktop.

Next modify this file from line 102
{code type=php}
$select = $adapter->select()
->where(‘url=?’, $item['url']);


{code type=php}
$select = $adapter->select()
->where(‘url=? OR url IS NULL’, $item['url'])
->where(‘title=?’, $item['title']);

Then put that file back into its new location at app/code/local/Mage/AdminNotification/Model/Resource. If any of these folders are not there, create them.

Next log in to your Magento admin area and delete all your notifications.

Should be all sorted then!

Happy coding!

About Jonathan

Jonathan likes playing with code, cars and ermm... digital things

Related Posts
Comments (2)
  1. vishal

    but it just ignore the poping up notification. I want in real to change the default contact details and echo it where ever I want on my page. how can I access this detail and alter it programatically and by admin login(if any way). thank you in advance.( am using magento on linux.

    1. Jonathan

      Hi Vishal,

      You can echo the store telephone number by either of the following options:

      In a template file:
      < ?php echo Mage::getStoreConfig('general/store_information/phone'); ?>

      or in a CMS page/block:
      {{config path="general/store_information/phone"}}

      You can change the store contact number in Magento’s ‘General’ Options.