Skip to content

Commit

Permalink
https://github.com/opencart/opencart/issues/14263
Browse files Browse the repository at this point in the history
  • Loading branch information
danielkerr committed Dec 11, 2024
1 parent b875eb5 commit 7cc73a6
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 9 deletions.
6 changes: 5 additions & 1 deletion upload/admin/controller/catalog/category.php
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,11 @@ public function form(): void {

$this->load->model('setting/store');

$data['stores'] = $data['stores'] + $this->model_setting_store->getStores();
$results = $this->model_setting_store->getStores();

foreach ($results as $result) {
$data['stores'][] = $result;
}

if (isset($this->request->get['category_id'])) {
$data['category_store'] = $this->model_catalog_category->getStores($this->request->get['category_id']);
Expand Down
6 changes: 5 additions & 1 deletion upload/admin/controller/catalog/information.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,11 @@ public function form(): void {

$this->load->model('setting/store');

$data['stores'] = $data['stores'] + $this->model_setting_store->getStores();
$results = $this->model_setting_store->getStores();

foreach ($results as $result) {
$data['stores'][] = $result;
}

if (isset($this->request->get['information_id'])) {
$data['information_store'] = $this->model_catalog_information->getStores($this->request->get['information_id']);
Expand Down
6 changes: 5 additions & 1 deletion upload/admin/controller/catalog/manufacturer.php
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,11 @@ public function form(): void {

$this->load->model('setting/store');

$data['stores'] = $data['stores'] + $this->model_setting_store->getStores();
$results = $this->model_setting_store->getStores();

foreach ($results as $result) {
$data['stores'][] = $result;
}

if (isset($this->request->get['manufacturer_id'])) {
$data['manufacturer_store'] = $this->model_catalog_manufacturer->getStores($this->request->get['manufacturer_id']);
Expand Down
6 changes: 5 additions & 1 deletion upload/admin/controller/catalog/product.php
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,11 @@ public function form(): void {

$this->load->model('setting/store');

$data['stores'] = $data['stores'] + $this->model_setting_store->getStores();
$results = $this->model_setting_store->getStores();

foreach ($results as $result) {
$data['stores'][] = $result;
}

if ($product_id) {
$data['product_store'] = $this->model_catalog_product->getStores($product_id);
Expand Down
6 changes: 5 additions & 1 deletion upload/admin/controller/cms/article.php
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,11 @@ public function form(): void {

$this->load->model('setting/store');

$data['stores'] = $data['stores'] + $this->model_setting_store->getStores();
$results = $this->model_setting_store->getStores();

foreach ($results as $result) {
$data['stores'][] = $result;
}

if (isset($this->request->get['article_id'])) {
$data['article_store'] = $this->model_cms_article->getStores($this->request->get['article_id']);
Expand Down
6 changes: 5 additions & 1 deletion upload/admin/controller/cms/topic.php
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,11 @@ public function form(): void {

$this->load->model('setting/store');

$data['stores'] = $data['stores'] + $this->model_setting_store->getStores();
$results = $this->model_setting_store->getStores();

foreach ($results as $result) {
$data['stores'][] = $result;
}

if (isset($this->request->get['topic_id'])) {
$data['topic_store'] = $this->model_cms_topic->getStores($this->request->get['topic_id']);
Expand Down
12 changes: 10 additions & 2 deletions upload/admin/controller/sale/order.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,11 @@ public function index(): void {

$this->load->model('setting/store');

$data['stores'] = $data['stores'] + $this->model_setting_store->getStores();
$results = $this->model_setting_store->getStores();

foreach ($results as $result) {
$data['stores'][] = $result;
}

$this->load->model('localisation/order_status');

Expand Down Expand Up @@ -666,7 +670,11 @@ public function info(): void {

$this->load->model('setting/store');

$data['stores'] = $data['stores'] + $this->model_setting_store->getStores();
$results = $this->model_setting_store->getStores();

foreach ($results as $result) {
$data['stores'][] = $result;
}

if (!empty($order_info)) {
$data['store_id'] = $order_info['store_id'];
Expand Down
6 changes: 5 additions & 1 deletion upload/admin/controller/sale/subscription.php
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,11 @@ public function info(): void {

$this->load->model('setting/store');

$data['stores'] = $data['stores'] + $this->model_setting_store->getStores();
$results = $this->model_setting_store->getStores();

foreach ($results as $result) {
$data['stores'][] = $result;
}

if (!empty($subscription_info)) {
$data['store_id'] = $subscription_info['store_id'];
Expand Down

0 comments on commit 7cc73a6

Please sign in to comment.