1: | <?php
2: | namespace Opencart\Catalog\Controller\Startup;
3: | /**
4: | * Class Customer
5: | *
6: | * @package Opencart\Catalog\Controller\Startup
7: | */
8: | class Customer extends \Opencart\System\Engine\Controller {
9: | /**
10: | * @return void
11: | */
12: | public function index(): void {
13: | $this->registry->set('customer', new \Opencart\System\Library\Cart\Customer($this->registry));
14: |
15: | // Customer Group
16: | if (isset($this->session->data['customer'])) {
17: | $this->config->set('config_customer_group_id', $this->session->data['customer']['customer_group_id']);
18: | } elseif ($this->customer->isLogged()) {
19: | // Logged in customers
20: | $this->config->set('config_customer_group_id', $this->customer->getGroupId());
21: | }
22: | }
23: | }
24: |

OpenCart API API documentation generated by ApiGen dev-master