Reputation: 3214
I am using magento Enterprise edition 1.9, and after custom theming, site is on live. But the problem is when i open the site in IE8, it gave alert like the page is not safe, since the page is loaded with both http/https content.
Sometime before I got something like this for magento CE 1.4 and it was working as far as I remember.
Default code of 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());
}
is then replaced by following code
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());**
}
This is it. You can now use peacefully https on Internet Explorer.
By adding this line skin also comes into https whenever https page is loaded, so I didn't get error that time. But here in EE 1.9 I am not able to find this function in Mage_Catalog_Block_Navigation.
I tried with command line,
find -type f -print0 | xargs -0 grep -i "getCacheKey()"
This does not return the function in this way, that function having some other cache info.
Is anybody solved this issue. Please help to find this function.
Upvotes: 0
Views: 882
Reputation: 18692
I see the following code block in 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;
}
You should be able to override and update the returned keys to suit your purpose.
Cheers, JD
Upvotes: 2