1: | <?php
|
2: | namespace Opencart\Admin\Controller\Startup;
|
3: | |
4: | |
5: | |
6: | |
7: |
|
8: | class Application extends \Opencart\System\Engine\Controller {
|
9: | |
10: | |
11: | |
12: | |
13: |
|
14: | public function index(): void {
|
15: |
|
16: | $this->registry->set('url', new \Opencart\System\Library\Url($this->config->get('site_url')));
|
17: |
|
18: |
|
19: | $this->registry->set('customer', new \Opencart\System\Library\Cart\Customer($this->registry));
|
20: |
|
21: |
|
22: | $this->registry->set('currency', new \Opencart\System\Library\Cart\Currency($this->registry));
|
23: |
|
24: |
|
25: | $this->registry->set('tax', new \Opencart\System\Library\Cart\Tax($this->registry));
|
26: |
|
27: | if ($this->config->get('config_tax_default') == 'shipping') {
|
28: | $this->tax->setShippingAddress((int)$this->config->get('config_country_id'), (int)$this->config->get('config_zone_id'));
|
29: | }
|
30: |
|
31: | if ($this->config->get('config_tax_default') == 'payment') {
|
32: | $this->tax->setPaymentAddress((int)$this->config->get('config_country_id'), (int)$this->config->get('config_zone_id'));
|
33: | }
|
34: |
|
35: | $this->tax->setStoreAddress((int)$this->config->get('config_country_id'), (int)$this->config->get('config_zone_id'));
|
36: |
|
37: |
|
38: | $this->registry->set('weight', new \Opencart\System\Library\Cart\Weight($this->registry));
|
39: |
|
40: |
|
41: | $this->registry->set('length', new \Opencart\System\Library\Cart\Length($this->registry));
|
42: |
|
43: |
|
44: | $this->registry->set('cart', new \Opencart\System\Library\Cart\Cart($this->registry));
|
45: |
|
46: | $this->load->helper('validation');
|
47: | }
|
48: | }
|
49: | |