public function hookRightColumn($params) { if (Configuration::get('PS_CATALOG_MODE')) { return; } // We need to create multiple caches because the products are sorted randomly $random = date('Ymd') . '|' . round(rand(1, max(Configuration::get('BLOCKSPECIALS_NB_CACHES'), 1))); if (!Configuration::get('BLOCKSPECIALS_NB_CACHES') || !$this->isCached('blockspecials.tpl', $this->getCacheId('blockspecials|' . $random))) { $countSpecial = Product::getCountSpecial((int) $params['cookie']->id_lang, 4); $this->smarty->assign(array('special' => $countSpecial, 'priceWithoutReduction_tax_excl' => Tools::ps_round(isset($special) ? $special['price_without_reduction'] : 0, 2), 'mediumSize' => Image::getSize(ImageType::getFormatedName('medium')))); } return $this->display(__FILE__, 'blockspecials.tpl', Configuration::get('BLOCKSPECIALS_NB_CACHES') ? $this->getCacheId('blockspecials|' . $random) : null); }