2011-01-24 140 views
0

我使用的是magento企業版1.9,並且在自定義主題後,網站已啓用。但問題是,當我在IE8中打開該網站時,它提供了像頁面一樣的警告是不安全的,因爲該頁面同時加載了http/https內容。magento https + IE8警報問題

之前我爲magento CE 1.4找到類似的東西,而且它的工作情況盡我所知。 getCacheKey

public function getCacheKey() 
{ 
    return 'CATALOG_NAVIGATION_' . Mage::app()->getStore()->getId() 
     . '_' . Mage::getDesign()->getPackageName() 
     . '_' . Mage::getDesign()->getTheme('template') 
     . '_' . Mage::getSingleton('customer/session')->getCustomerGroupId() 
     . '_' . md5($this->getTemplate() . $this->getCurrenCategoryKey()); 
} 

默認代碼,然後通過下面的代碼

public function getCacheKey() 
{ 
    return 'CATALOG_NAVIGATION_' . Mage::app()->getStore()->getId() 
     . '_' . Mage::getDesign()->getPackageName() 
     . '_' . Mage::getDesign()->getTheme('template') 
     . '_' . Mage::getSingleton('customer/session')->getCustomerGroupId() 
     . '_' . md5($this->getTemplate() . $this->getCurrenCategoryKey()) 
     **. '_' . md5($this->getSkinUrl());** 
} 

這是它替換。您現在可以在Internet Explorer上使用和平的https。

通過在https頁面加載時加入這一行皮膚也會進入https,所以當時我沒有得到錯誤。但是在EE 1.9中,我無法在Mage_Catalog_Block_Navigation中找到此功能 。

我試着用命令行,

find -type f -print0 | xargs -0 grep -i "getCacheKey()" 

這樣這不返回的功能,有一些其他的緩存信息該功能。

是否有人解決了這個問題。請幫忙找到這個功能。

回答

2

我看到DOCROOT\app\code\core\Mage\Catalog\Block\Navigation.php下面的代碼塊:

/** 
* Get Key pieces for caching block content 
* 
* @return array 
*/ 
public function getCacheKeyInfo() 
{ 
    $shortCacheId = array(
     'CATALOG_NAVIGATION', 
     Mage::app()->getStore()->getId(), 
     Mage::getDesign()->getPackageName(), 
     Mage::getDesign()->getTheme('template'), 
     Mage::getSingleton('customer/session')->getCustomerGroupId(), 
     'template' => $this->getTemplate(), 
     'name' => $this->getNameInLayout() 
    ); 
    $cacheId = $shortCacheId; 

    $shortCacheId = array_values($shortCacheId); 
    $shortCacheId = implode('|', $shortCacheId); 
    $shortCacheId = md5($shortCacheId); 

    $cacheId['category_path'] = $this->getCurrenCategoryKey(); 
    $cacheId['short_cache_id'] = $shortCacheId; 

    return $cacheId; 
} 

你應該能夠覆蓋和更新返回鍵,以適合你的目的。

乾杯, JD

+0

你好,是的,那是一個我想,但我沒有加入這一行。 'skin'=> $ this-> getSkinUrl(),但當它的混合copntent頁面時,它仍然在https頁面上顯示警告。 – Elamurugan 2011-01-25 18:05:13