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 %}