Ejemplo n.º 1
0
 public function hookDisplayNav($params)
 {
     if (Tools::getValue('ajax') || Configuration::get('PS_CATALOG_MODE')) {
         return;
     }
     if (PP::isMeasurementSystemFOActivated()) {
         $measurement_systems = array(PP::PP_MS_METRIC => array('name' => $this->l('Metric'), 'title' => $this->l('Metric measurement system')), PP::PP_MS_NON_METRIC => array('name' => $this->l('Imperial/US'), 'title' => $this->l('Imperial/US measurement system')));
         $this->smarty->assign('measurement_systems', $measurement_systems);
         return $this->display(__FILE__, 'front/measurement_system.tpl');
     }
 }
Ejemplo n.º 2
0
 protected function getCacheId($name = null)
 {
     $cache_array = array();
     $cache_array[] = $name !== null ? $name : $this->name;
     if (Configuration::get('PS_SSL_ENABLED')) {
         $cache_array[] = (int) Tools::usingSecureMode();
     }
     if (Shop::isFeatureActive()) {
         $cache_array[] = (int) $this->context->shop->id;
     }
     if (Group::isFeatureActive()) {
         $cache_array[] = (int) Group::getCurrent()->id;
     }
     if (Language::isMultiLanguageActivated()) {
         $cache_array[] = (int) $this->context->language->id;
     }
     if (Currency::isMultiCurrencyActivated()) {
         $cache_array[] = (int) $this->context->currency->id;
     }
     $cache_array[] = (int) $this->context->country->id;
     if (PP::isMeasurementSystemFOActivated()) {
         $cache_array[] = PP::resolveMS();
     }
     return implode('|', $cache_array);
 }