[*] MO: Add smarty cache on some modules
This commit is contained in:
@@ -71,6 +71,7 @@ class BlockPaymentLogo extends Module
|
||||
if (Validate::isUnsignedInt(Tools::getValue('id_cms')))
|
||||
{
|
||||
Configuration::updateValue('PS_PAYMENT_LOGO_CMS_ID', (int)(Tools::getValue('id_cms')));
|
||||
$this->_clearCache('blockpaymentlogo.tpl');
|
||||
$html .= $this->displayConfirmation($this->l('Settings are updated'));
|
||||
}
|
||||
|
||||
@@ -110,14 +111,17 @@ class BlockPaymentLogo extends Module
|
||||
if (Configuration::get('PS_CATALOG_MODE'))
|
||||
return;
|
||||
|
||||
if (!$this->isCached('blockpaymentlogo.tpl', $this->getCacheId()))
|
||||
{
|
||||
if (!Configuration::get('PS_PAYMENT_LOGO_CMS_ID'))
|
||||
return;
|
||||
$cms = new CMS(Configuration::get('PS_PAYMENT_LOGO_CMS_ID'), $this->context->language->id);
|
||||
if (!Validate::isLoadedObject($cms))
|
||||
return;
|
||||
$this->smarty->assign('cms_payement_logo', $cms);
|
||||
}
|
||||
|
||||
if (!Configuration::get('PS_PAYMENT_LOGO_CMS_ID'))
|
||||
return;
|
||||
$cms = new CMS(Configuration::get('PS_PAYMENT_LOGO_CMS_ID'), $this->context->language->id);
|
||||
if (!Validate::isLoadedObject($cms))
|
||||
return;
|
||||
$this->smarty->assign('cms_payement_logo', $cms);
|
||||
return $this->display(__FILE__, 'blockpaymentlogo.tpl');
|
||||
return $this->display(__FILE__, 'blockpaymentlogo.tpl', $this->getCacheId());
|
||||
}
|
||||
|
||||
public function hookRightColumn($params)
|
||||
|
||||
Reference in New Issue
Block a user