1: | <?php
|
2: | namespace Opencart\Catalog\Controller\Account;
|
3: | |
4: | |
5: | |
6: | |
7: |
|
8: | class Success extends \Opencart\System\Engine\Controller {
|
9: | |
10: | |
11: |
|
12: | public function index(): void {
|
13: | $this->load->language('account/success');
|
14: |
|
15: | $this->document->setTitle($this->language->get('heading_title'));
|
16: |
|
17: | $data['breadcrumbs'] = [];
|
18: |
|
19: | $data['breadcrumbs'][] = [
|
20: | 'text' => $this->language->get('text_home'),
|
21: | 'href' => $this->url->link('common/home', 'language=' . $this->config->get('config_language'))
|
22: | ];
|
23: |
|
24: | $data['breadcrumbs'][] = [
|
25: | 'text' => $this->language->get('text_account'),
|
26: | 'href' => $this->url->link('account/account', 'language=' . $this->config->get('config_language') . (isset($this->session->data['customer_token']) ? '&customer_token=' . $this->session->data['customer_token'] : ''))
|
27: | ];
|
28: |
|
29: | $data['breadcrumbs'][] = [
|
30: | 'text' => $this->language->get('heading_title'),
|
31: | 'href' => $this->url->link('account/success', 'language=' . $this->config->get('config_language') . (isset($this->session->data['customer_token']) ? '&customer_token=' . $this->session->data['customer_token'] : ''))
|
32: | ];
|
33: |
|
34: | if ($this->customer->isLogged()) {
|
35: | $data['text_message'] = sprintf($this->language->get('text_success'), $this->url->link('information/contact', 'language=' . $this->config->get('config_language')));
|
36: | } else {
|
37: | $data['text_message'] = sprintf($this->language->get('text_approval'), $this->config->get('config_name'), $this->url->link('information/contact', 'language=' . $this->config->get('config_language')));
|
38: | }
|
39: |
|
40: | if ($this->cart->hasProducts()) {
|
41: | $data['continue'] = $this->url->link('checkout/cart', 'language=' . $this->config->get('config_language'));
|
42: | } else {
|
43: | $data['continue'] = $this->url->link('account/account', 'language=' . $this->config->get('config_language') . (isset($this->session->data['customer_token']) ? '&customer_token=' . $this->session->data['customer_token'] : ''));
|
44: | }
|
45: |
|
46: | $data['column_left'] = $this->load->controller('common/column_left');
|
47: | $data['column_right'] = $this->load->controller('common/column_right');
|
48: | $data['content_top'] = $this->load->controller('common/content_top');
|
49: | $data['content_bottom'] = $this->load->controller('common/content_bottom');
|
50: | $data['footer'] = $this->load->controller('common/footer');
|
51: | $data['header'] = $this->load->controller('common/header');
|
52: |
|
53: | $this->response->setOutput($this->load->view('common/success', $data));
|
54: | }
|
55: | }
|
56: | |