Skip to content

Commit

Permalink
https://github.com/opencart/opencart/issues/12661
Browse files Browse the repository at this point in the history
  • Loading branch information
danielkerr committed May 13, 2024
1 parent 1cd3c2f commit ca5b12f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
2 changes: 0 additions & 2 deletions upload/admin/controller/sale/order.php
Original file line number Diff line number Diff line change
Expand Up @@ -1202,7 +1202,6 @@ public function info(): void {

// 3. Add the request GET vars
$store->request->get['route'] = 'api/order.load';
$store->request->get['language'] = $data['language_code'];

// 4. Add the request POST var
$store->request->post = $this->request->post;
Expand Down Expand Up @@ -1344,7 +1343,6 @@ public function call(): void {

// 4. Add the request GET vars
$store->request->get['route'] = 'api/' . $call;
$store->request->get['language'] = $language;

// 5. Add the request POST var
$store->request->post = $this->request->post;
Expand Down
10 changes: 6 additions & 4 deletions upload/admin/model/setting/store.php
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,6 @@ public function createStoreInstance(int $store_id = 0, string $language = '', st
$request->server = $this->request->server;
$request->cookie = [];



// Request
$registry->set('request', $request);

Expand All @@ -236,10 +234,14 @@ public function createStoreInstance(int $store_id = 0, string $language = '', st
$registry->set('template', $template);

// Adding language var to the GET variable so there is a default language
$request->get['language'] = $language;
if ($language) {
$request->get['language'] = $language;
} else {
$request->get['language'] = $config->get('language_code');
}

// Language
$language = new \Opencart\System\Library\Language($config->get('language_code'));
$language = new \Opencart\System\Library\Language($request->get['language']);
$language->addPath(DIR_CATALOG . 'language/');
$language->load('default');
$registry->set('language', $language);
Expand Down
2 changes: 0 additions & 2 deletions upload/catalog/controller/api/order.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ public function save(): void {
$this->session->data['order_id'] = 0;
}



// Customer
$this->load->model('account/customer');

Expand Down

0 comments on commit ca5b12f

Please sign in to comment.