[*] Core: conversion_rate of currencies are now multishop
This commit is contained in:
@@ -31,7 +31,6 @@ class AdminCurrenciesControllerCore extends AdminController
|
||||
$this->table = 'currency';
|
||||
$this->className = 'Currency';
|
||||
$this->lang = false;
|
||||
$this->multishop_context = Shop::CONTEXT_ALL;
|
||||
|
||||
$this->fields_list = array(
|
||||
'id_currency' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25),
|
||||
@@ -69,6 +68,9 @@ class AdminCurrenciesControllerCore extends AdminController
|
||||
);
|
||||
|
||||
parent::__construct();
|
||||
|
||||
$this->_select .= 'currency_shop.conversion_rate conversion_rate';
|
||||
$this->_join .= Shop::addSqlAssociation('currency', 'a');
|
||||
}
|
||||
|
||||
public function renderList()
|
||||
|
||||
@@ -323,6 +323,10 @@ class AdminLocalizationControllerCore extends AdminController
|
||||
public function updateOptionPsCurrencyDefault($value)
|
||||
{
|
||||
Configuration::updateValue('PS_CURRENCY_DEFAULT', $value);
|
||||
|
||||
/* Set conversion rate of default currency to 1 */
|
||||
ObjectModel::updateMultishopTable('Currency', array('conversion_rate' => 1), 'a.id_currency');
|
||||
|
||||
Currency::refreshCurrencies();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user