Ejemplo n.º 1
0
 public function __construct($registry)
 {
     parent::__construct();
     $this->config = $registry->get('config');
     $this->customer = $registry->get('customer');
     $this->session = $registry->get('session');
     $this->tax = $registry->get('tax');
     $this->weight = $registry->get('weight');
     $this->language_id = intval($this->config->get('config_language_id'));
 }
Ejemplo n.º 2
0
 public function __construct($registry)
 {
     parent::__construct();
     $this->request = $registry->get('request');
     $this->session = $registry->get('session');
     if (isset($this->session->data['user_id'])) {
         $this->permission = $this->_get_permission($this->session->data['user_group_id']);
         if (empty($this->permission)) {
             $this->logout();
         }
         $this->user_id = $this->session->data['user_id'];
         $this->username = $this->session->data['username'];
     }
 }
Ejemplo n.º 3
0
 public function __construct($registry)
 {
     parent::__construct();
     $this->config = $registry->get('config');
     $this->language = $registry->get('language');
     $this->request = $registry->get('request');
     $this->currencies = $this->hash_sql("SELECT * FROM " . DB_PREFIX . "currency", 'code');
     if (isset($this->request->get['currency']) && isset($this->currencies[$this->request->get['currency']])) {
         $this->set($this->request->get['currency']);
     } elseif (isset($this->request->cookie['currency']) && isset($this->currencies[$this->request->cookie['currency']])) {
         $this->set($this->request->cookie['currency']);
     } else {
         $this->set($this->config->get('config_currency'));
     }
 }
Ejemplo n.º 4
0
 /**
  * @param $registry Registry
  */
 public function __construct($registry)
 {
     parent::__construct();
     $this->registry = $registry;
     $this->tax = $registry->get('tax');
     $this->url = $registry->get('url');
     $this->log = $registry->get('log');
     $this->load = $registry->get('load');
     $this->config = $registry->get('config');
     $this->request = $registry->get('request');
     $this->session = $registry->get('session');
     $this->response = $registry->get('response');
     $this->language = $registry->get('language');
     $this->currency = $registry->get('currency');
     $this->document = $registry->get('document');
     $this->customer = $registry->get('customer');
     $this->tplname = $this->config->get('config_template');
 }
Ejemplo n.º 5
0
 public function __construct($registry)
 {
     parent::__construct();
     $this->config = $registry->get('config');
     $this->request = $registry->get('request');
     $this->session = $registry->get('session');
     if (isset($this->session->data['customer_id'])) {
         $ures = $this->mem_sql("SELECT * FROM " . DB_PREFIX . "customer WHERE customer_id = '{$this->session->data['customer_id']}' AND status = '1'");
         if (!empty($ures)) {
             $this->customer_id = $ures['customer_id'];
             $this->firstname = $ures['firstname'];
             $this->lastname = $ures['lastname'];
             $this->email = $ures['email'];
             $this->telephone = $ures['telephone'];
             $this->fax = $ures['fax'];
             $this->newsletter = $ures['newsletter'];
             $this->customer_group_id = $ures['customer_group_id'];
             $this->address_id = $ures['address_id'];
         } else {
             $this->logout();
         }
     }
 }