Merge branch 'ticket-14698-sensefuel' into develop
This commit is contained in:
commit
6fbc309c2d
@ -7,7 +7,7 @@ class SenseFuel extends Module
|
||||
public static $ACTIVE_VERSION_ARRAY = array('com', 'fr');
|
||||
public static $SETUP_VERSION_ARRAY = array();
|
||||
|
||||
private $display = true;
|
||||
private $display = false;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
@ -43,13 +43,21 @@ class SenseFuel extends Module
|
||||
|
||||
private function _checkDisplay()
|
||||
{
|
||||
global $cookie;
|
||||
global $site_version, $smarty, $page_name, $cookie;
|
||||
|
||||
// Groupe test
|
||||
/*$groups = Customer::getGroupsStatic($cookie->id_customer);
|
||||
if (in_array(2, array_values($groups))) {
|
||||
$this->display = true;
|
||||
}*/
|
||||
|
||||
if (null !== $site_version &&
|
||||
null !== $page_name &&
|
||||
in_array($site_version, self::$ACTIVE_VERSION_ARRAY, true) /*&&
|
||||
in_array($page_name, array('index', 'category', 'product'), true)*/
|
||||
) {
|
||||
$this->display = true;
|
||||
}
|
||||
}
|
||||
|
||||
public function hookTop($params)
|
||||
@ -58,28 +66,10 @@ class SenseFuel extends Module
|
||||
return false;
|
||||
}
|
||||
|
||||
global $site_version, $smarty, $page_name, $cookie;
|
||||
global $smarty;
|
||||
$smarty->assign(array('display' => $this->display));
|
||||
|
||||
if (null !== $site_version &&
|
||||
null !== $page_name &&
|
||||
in_array($site_version, self::$ACTIVE_VERSION_ARRAY, true) /*&&
|
||||
in_array($page_name, array('index', 'category', 'product'), true)*/
|
||||
) {
|
||||
$smarty->assign(array('display' => $this->display));
|
||||
|
||||
return self::display(__FILE__, 'views/top-sensefuel.tpl');
|
||||
}
|
||||
|
||||
if (null !== $site_version &&
|
||||
null !== $page_name &&
|
||||
in_array($site_version, self::$SETUP_VERSION_ARRAY, true) /*&&
|
||||
in_array($page_name, array('index', 'category', 'product'), true) &&
|
||||
Tools::isConnectedToBackOffice()*/
|
||||
) {
|
||||
return self::display(__FILE__, 'views/top-sensefuel.tpl');
|
||||
}
|
||||
|
||||
return false;
|
||||
return self::display(__FILE__, 'views/top-sensefuel.tpl');
|
||||
}
|
||||
|
||||
public function hookSubTop($params)
|
||||
@ -88,46 +78,20 @@ class SenseFuel extends Module
|
||||
return false;
|
||||
}
|
||||
|
||||
global $site_version, $smarty, $page_name;
|
||||
global $smarty;
|
||||
$smarty->assign(array('display' => $this->display));
|
||||
|
||||
if (null !== $site_version &&
|
||||
null !== $page_name &&
|
||||
in_array($site_version, self::$ACTIVE_VERSION_ARRAY , true) /*&&
|
||||
in_array($page_name, array('index', 'category', 'product'), true)*/
|
||||
) {
|
||||
$smarty->assign(array('display' => $this->display));
|
||||
|
||||
return self::display(__FILE__, 'views/top-sensefuel.tpl');
|
||||
}
|
||||
|
||||
if (null !== $site_version &&
|
||||
null !== $page_name &&
|
||||
in_array($site_version, self::$SETUP_VERSION_ARRAY , true) /*&&
|
||||
in_array($page_name, array('index', 'category', 'product'), true) &&
|
||||
Tools::isConnectedToBackOffice()*/
|
||||
) {
|
||||
return self::display(__FILE__, 'views/top-sensefuel.tpl');
|
||||
}
|
||||
|
||||
return false;
|
||||
return self::display(__FILE__, 'views/top-sensefuel.tpl');
|
||||
}
|
||||
|
||||
public function hookFooter($params)
|
||||
{
|
||||
global $site_version, $smarty;
|
||||
global $smarty;
|
||||
|
||||
$display = false;
|
||||
|
||||
if (null !== $site_version &&
|
||||
( in_array($site_version, self::$ACTIVE_VERSION_ARRAY, true)
|
||||
|| in_array($site_version, self::$SETUP_VERSION_ARRAY, true))) {
|
||||
$smarty->assign(array('display' => $this->display));
|
||||
$smarty->assign(array('sensefuelversion' => $site_version));
|
||||
$smarty->assign(array('display' => $this->display));
|
||||
$smarty->assign(array('sensefuelversion' => $site_version));
|
||||
|
||||
return self::display(__FILE__, 'views/footer.tpl');
|
||||
}
|
||||
|
||||
return false;
|
||||
return self::display(__FILE__, 'views/footer.tpl');
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user