[-] MO : fixed smarty cache on blocksearch #PSCFV-8739

This commit is contained in:
Damien Metzger
2013-08-21 15:13:35 +02:00
parent 600b027efd
commit 4d3fc8c314
+5 -4
View File
@@ -80,23 +80,24 @@ public function hookDisplayMobileHeader($params)
public function hookRightColumn($params)
{
if (!$this->isCached('blocksearch.tpl', $this->getCacheId()))
if (Tools::getValue('search_query') || !$this->isCached('blocksearch.tpl', $this->getCacheId()))
{
$this->calculHookCommon($params);
$this->smarty->assign('blocksearch_type', 'block');
}
return $this->display(__FILE__, 'blocksearch.tpl', $this->getCacheId());
return $this->display(__FILE__, 'blocksearch.tpl', Tools::getValue('search_query') ? null : $this->getCacheId());
}
public function hookTop($params)
{
if (!$this->isCached('blocksearch-top.tpl', $this->getCacheId('blocksearch-top')))
if (Tools::getValue('search_query') || !$this->isCached('blocksearch-top.tpl', $this->getCacheId('blocksearch-top')))
{
$this->calculHookCommon($params);
$this->smarty->assign('blocksearch_type', 'top');
}
return $this->display(__FILE__, 'blocksearch-top.tpl', $this->getCacheId('blocksearch-top'));
return $this->display(__FILE__, 'blocksearch-top.tpl', Tools::getValue('search_query') ? null : $this->getCacheId('blocksearch-top'));
}
/**