Magento 1.9 – Favicon Won’t Change in Root Directory

magento-1.9

We have managed to change the favicon for the main website but when someone clicks on a link that opens a new window (application forms, etc) then the magento favicon is used. Every time I delete the favicon in my root directory and upload my own (with the same name) it overwrite it and restores the Magento one.

I have also now gone through and deleted every Magento favicon there is in my root directory and still it appears……

How change a i change it so on every change even the new windows that open up have my favicon?

Best Answer

Step 2: Upload the Favicon to Your Store From the Admin panel, select System > Configuration. In the Configuration panel on the left, under General, select Design. Then, click to expand the HTML Head section. Next to the Favicon Icon field, click the Browse button. Find and select the favicon file to upload. When complete, click the Save Config button.

Source:


UPDATED

A look around the class Mage_Page_Block_Html_Head

/**
 * Retrieve path to Favicon
 *
 * @return string
 */
protected function _getFaviconFile()
{
    $folderName = Mage_Adminhtml_Model_System_Config_Backend_Image_Favicon::UPLOAD_DIR;
    $storeConfig = Mage::getStoreConfig('design/head/shortcut_icon');
    $faviconFile = Mage::getBaseUrl('media') . $folderName . '/' . $storeConfig;
    $absolutePath = Mage::getBaseDir('media') . '/' . $folderName . '/' . $storeConfig;

    if(!is_null($storeConfig) && $this->_isFile($absolutePath)) {
        $url = $faviconFile;
    } else {
        $url = $this->getSkinUrl('favicon.ico');
    }
    return $url;
}

Would be a good point to check on pages you are experiencing the default icon. Possibly the favicon.ico file in your template/theme may be getting used instead.

Some common paths of the favicon.ico file:

  • /favicon.ico
  • /media/favicon/favicon.ico
  • /skin/<package>/<template>/favicon.ico
Related Topic