remove presta cache system for similar products

This commit is contained in:
Marion Muszynski 2017-03-29 10:07:59 +02:00
parent 79b2174ae3
commit 85ca91ccfc

View File

@ -144,9 +144,6 @@ class Privatesales_similarproducts extends Module
{ {
global $smarty; global $smarty;
$cache_id = (int)$params['cookie']->id_lang.'_'.(int)$params['product']->id;
if (!$this->isTemplateCached($cache_id)) {
$other_products = array(); $other_products = array();
$accessories = $params['product']->getAccessories($params['cookie']->id_lang); $accessories = $params['product']->getAccessories($params['cookie']->id_lang);
@ -171,19 +168,13 @@ class Privatesales_similarproducts extends Module
'ps_other_products' => $other_products, 'ps_other_products' => $other_products,
) )
); );
} return $this->display(__FILE__, 'front_similarproducts.tpl');
return $this->flushTemplateCache($cache_id);
} }
private function displayBestVPSalesSameFamily($params) private function displayBestVPSalesSameFamily($params)
{ {
global $smarty; global $smarty;
$cache_id = (int)$params['cookie']->id_lang.'_'.(int)$params['product']->id;
if (!$this->isTemplateCached($cache_id)) {
$currency = new Currency((int)($params['cookie']->id_currency)); $currency = new Currency((int)($params['cookie']->id_currency));
// get all best sales of the product family // get all best sales of the product family
@ -202,7 +193,6 @@ class Privatesales_similarproducts extends Module
$other_products[] = $bestseller; $other_products[] = $bestseller;
} }
} }
if (empty($other_products)) { if (empty($other_products)) {
return ''; return '';
} }
@ -213,9 +203,7 @@ class Privatesales_similarproducts extends Module
'ps_other_products' => $other_products, 'ps_other_products' => $other_products,
) )
); );
} return $this->display(__FILE__, 'front_similarproducts.tpl');
return $this->flushTemplateCache($cache_id);
} }