From f6197986f29dd2f7a4841448c938ba3759d37406 Mon Sep 17 00:00:00 2001 From: Konstantin Date: Sat, 30 May 2026 13:43:04 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9E=D1=82=D0=BE=D0=B1=D1=80=D0=B0=D0=B6?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D1=86=D0=B5=D0=BD=20=D0=BF=D0=BE=20?= =?UTF-8?q?=D0=BC=D0=B0=D0=B3=D0=B0=D0=B7=D0=B8=D0=BD=D0=B0=D0=BC=20=D0=B8?= =?UTF-8?q?=20=D0=BC=D1=83=D0=BB=D1=8C=D1=82=D0=B8=D0=BF=D1=80=D0=BE=D1=81?= =?UTF-8?q?=D0=BC=D0=BE=D1=82=D1=80=20=D1=82=D0=BE=D0=B2=D0=B0=D1=80=D0=BE?= =?UTF-8?q?=D0=B2=20=D0=BD=D0=B0=20=D1=81=D0=B0=D0=B9=D1=82=D0=B0=D1=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/admin/controller/catalog/product.php | 31 ++++++++++++++----- .../view/template/catalog/product_form.twig | 15 +++++++-- .../view/template/catalog/product_list.twig | 11 +++++-- 3 files changed, 44 insertions(+), 13 deletions(-) diff --git a/public/admin/controller/catalog/product.php b/public/admin/controller/catalog/product.php index c3d5643..cd2dffe 100644 --- a/public/admin/controller/catalog/product.php +++ b/public/admin/controller/catalog/product.php @@ -617,11 +617,14 @@ class ControllerCatalogProduct extends Controller { $this->load->model('setting/store'); + $this->load->model('setting/setting'); $stores = array(); $stores[] = array( 'store_id' => 0, - 'name' => $this->config->get('config_name') + 'name' => $this->config->get('config_name'), + 'url' => HTTP_CATALOG, + 'currency' => $this->config->get('config_currency') ); $store_results = $this->model_setting_store->getStores(); @@ -629,7 +632,9 @@ class ControllerCatalogProduct extends Controller { foreach ($store_results as $store) { $stores[] = array( 'store_id' => $store['store_id'], - 'name' => $store['name'] + 'name' => $store['name'], + 'url' => $store['url'], + 'currency' => $this->model_setting_setting->getSettingValue('config_currency', $store['store_id']) ); } @@ -668,9 +673,9 @@ class ControllerCatalogProduct extends Controller { foreach ($stores as $store) { $store_id = $store['store_id']; if (isset($product_prices[$store_id])) { - $p = $this->currency->format($product_prices[$store_id]['price'], $this->config->get('config_currency')); - $p2 = $this->currency->format($product_prices[$store_id]['price_2'], $this->config->get('config_currency')); - $p3 = $this->currency->format($product_prices[$store_id]['price_3'], $this->config->get('config_currency')); + $p = $this->currency->format($product_prices[$store_id]['price'], $store['currency']); + $p2 = $this->currency->format($product_prices[$store_id]['price_2'], $store['currency']); + $p3 = $this->currency->format($product_prices[$store_id]['price_3'], $store['currency']); $prices_html .= '
' . $store['name'] . ': ' . $p . ' / ' . $p2 . ' / ' . $p3 . '
'; } } @@ -685,7 +690,6 @@ class ControllerCatalogProduct extends Controller { 'quantity' => $result['quantity'], 'status' => $result['status'] ? $this->language->get('text_enabled_short') : $this->language->get('text_disabled_short'), 'noindex' => $result['noindex'] ? $this->language->get('text_enabled_short') : $this->language->get('text_disabled_short'), - 'href_shop' => HTTP_CATALOG . 'index.php?route=product/product&product_id=' . $result['product_id'], 'edit' => $this->url->link('catalog/product/edit', 'user_token=' . $this->session->data['user_token'] . '&product_id=' . $result['product_id'] . $url, true), 'product_stores' => $product_stores ); @@ -1096,20 +1100,31 @@ class ControllerCatalogProduct extends Controller { } $this->load->model('setting/store'); + $this->load->model('setting/setting'); + $this->load->model('localisation/currency'); + + $currencies = $this->model_localisation_currency->getCurrencies(); $data['stores'] = array(); + $default_currency = $this->config->get('config_currency'); + $data['stores'][] = array( 'store_id' => 0, - 'name' => $this->config->get('config_name') + 'name' => $this->config->get('config_name'), + 'currency' => $default_currency, + 'symbol' => isset($currencies[$default_currency]) ? $currencies[$default_currency]['symbol_left'] : '' ); $stores = $this->model_setting_store->getStores(); foreach ($stores as $store) { + $store_currency = $this->model_setting_setting->getSettingValue('config_currency', $store['store_id']); $data['stores'][] = array( 'store_id' => $store['store_id'], - 'name' => $store['name'] + 'name' => $store['name'], + 'currency' => $store_currency, + 'symbol' => isset($currencies[$store_currency]) ? $currencies[$store_currency]['symbol_left'] : '' ); } diff --git a/public/admin/view/template/catalog/product_form.twig b/public/admin/view/template/catalog/product_form.twig index 6129384..f8bb19a 100644 --- a/public/admin/view/template/catalog/product_form.twig +++ b/public/admin/view/template/catalog/product_form.twig @@ -204,13 +204,22 @@ {{ store.name }} - +
+ + {{ store.symbol }} +
- +
+ + {{ store.symbol }} +
- +
+ + {{ store.symbol }} +
{% endfor %} diff --git a/public/admin/view/template/catalog/product_list.twig b/public/admin/view/template/catalog/product_list.twig index 1e89b06..cd24d8b 100644 --- a/public/admin/view/template/catalog/product_list.twig +++ b/public/admin/view/template/catalog/product_list.twig @@ -207,8 +207,15 @@ {{ product.noindex }} - - +
+ + +
+ {% endfor %}