/** * Cart constructor. * @param Registry $registry */ public function __construct($registry) { parent::__construct($registry); //$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'); if (!isset($this->getSession()->data['cart']) || !is_array($this->getSession()->data['cart'])) { $this->getSession()->data['cart'] = array(); } if (!isset($this->getSession()->data['selectedCartItems'])) { $this->getSession()->data['selectedCartItems'] = null; } }
/** * @param $registry Registry * @param string $action */ public function __construct($registry, $action = null) { parent::__construct($registry); $this->action = $action; $this->customer = $this->registry->get('customer'); $this->document = $this->registry->get('document'); $this->language = $this->registry->get('language'); $this->request = $this->registry->get('request'); $this->response = $this->registry->get('response'); $this->setSelfRoutes(); $this->session = $this->registry->get('session'); $_REQUEST = $this->cleanoutParameters($_REQUEST); $this->initParameters(); $this->data['notifications'] = array(); $this->load->library('audit'); }
/** * Currency constructor. * @param Registry $registry */ public function __construct($registry) { parent::__construct($registry); $this->setLanguage($registry->get('language')); $this->getRegistry()->set('request', $registry->get('request')); $this->setSession($registry->get('session')); $this->currencies = $this->getCache()->get('currencies'); if (is_null($this->currencies)) { $query = $this->getDb()->query("SELECT * FROM currency"); foreach ($query->rows as $result) { $this->currencies[$result['code']] = array('currency_id' => $result['currency_id'], 'title' => $result['title'], 'symbol_left' => $result['symbol_left'], 'symbol_right' => $result['symbol_right'], 'decimal_place' => $result['decimal_place'], 'value' => $result['value']); } $this->getCache()->set('currencies', $this->currencies); } if (isset($registry->get('request')->get['currency']) && array_key_exists($registry->get('request')->get['currency'], $this->currencies)) { $this->set($registry->get('request')->get['currency']); } elseif (isset($this->getSession()->data['currency']) && array_key_exists($this->getSession()->data['currency'], $this->currencies)) { $this->set($this->getSession()->data['currency']); } elseif (isset($registry->get('request')->cookie['currency']) && array_key_exists($registry->get('request')->cookie['currency'], $this->currencies)) { $this->set($registry->get('request')->cookie['currency']); } else { $this->set($this->getConfig()->get('config_currency')); } }
public function __construct($registry, $code) { parent::__construct($registry); $this->extensionCode = $code; }
public function __construct($registry) { parent::__construct($registry); }
protected function __construct($registry) { parent::__construct($registry); $this->modelTransaction = $this->getLoader()->model('sale/transaction', 'admin'); }