public function __construct($registry) { $config = $registry->get('config'); $currency = $registry->get('currency'); $this->request = $registry->get('request'); $this->store_id = $config->get('config_store_id'); $this->language_id = $config->get('config_language_id'); $this->currency_id = $currency->getCode(); if (self::$mobile_detect->isMobile()) { if (self::$mobile_detect->isTablet()) { self::$device = 'tablet'; } else { self::$device = 'mobile'; } } $this->logged_in = $registry->get('customer')->isLogged() ? 1 : 0; $this->price = $config->get('config_customer_price') && $registry->get('customer')->isLogged() || !$config->get('config_customer_price') ? 'price' : 'noprice'; $this->hostname = md5(Journal2Utils::getHostName()); }