2011-01-24 145 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