Merge branch 'development' of https://github.com/PrestaShop/PrestaShop into development

This commit is contained in:
gRoussac
2013-07-01 15:42:10 +02:00
8 changed files with 20 additions and 17 deletions
+3
View File
@@ -25,6 +25,9 @@ select[disabled="disabled"], input[disabled="disabled"],textarea[disabled="disab
.double_select select{width:300px;height:160px;}
.double_select a{text-align:center;display:block;border:1px solid #aaa;text-decoration:none;background-color:#fafafa;color:#123456;margin:2px;padding:2px}
.icon {vertical-align:middle}
.icon-top {vertical-align:top}
/*BUTTON*/
.button{
background: #e3e3e3 url('../img/bg-button-degrade.png') repeat-x scroll left top;
@@ -264,8 +264,8 @@
{if (!$order->valid && sizeof($currencies) > 1)}
<form method="post" action="{$currentIndex}&vieworder&id_order={$order->id}&token={$smarty.get.token|escape:'htmlall':'UTF-8'}">
<p class="warn">{l s='Don\'t forget to update your conversion rate before making this change.'}</p>
<label>{l s='Don\'t forget to update your conversion rate before making this change.'}</label>
<p class="warn">{l s='Do not forget to update your exchange rate before making this change.'}</p>
<label>{l s='Do not forget to update your exchange rate before making this change.'}</label>
<select name="new_currency">
{foreach from=$currencies item=currency_change}
{if $currency_change['id_currency'] != $order->id_currency}
+8 -8
View File
@@ -43,7 +43,7 @@ class CurrencyCore extends ObjectModel
/** @var int bool used for displaying blank between sign and price */
public $blank;
/** @var string Conversion rate from euros */
/** @var string exchange rate from euros */
public $conversion_rate;
/** @var boolean True if currency has been deleted (staying in database as deleted) */
@@ -326,23 +326,23 @@ class CurrencyCore extends ObjectModel
}
/**
* Refresh the currency conversion rate
* The XML file define conversion rate for each from a default currency ($isoCodeSource).
* Refresh the currency exchange rate
* The XML file define exchange rate for each from a default currency ($isoCodeSource).
*
* @param $data XML content which contains all the conversion rates
* @param $data XML content which contains all the exchange rates
* @param $isoCodeSource The default currency used in the XML file
* @param $defaultCurrency The default currency object
*/
public function refreshCurrency($data, $isoCodeSource, $defaultCurrency)
{
// fetch the conversion rate of the default currency
$conversion_rate = 1;
// fetch the exchange rate of the default currency
$exchange_rate = 1;
if ($defaultCurrency->iso_code != $isoCodeSource)
{
foreach ($data->currency as $currency)
if ($currency['iso_code'] == $defaultCurrency->iso_code)
{
$conversion_rate = round((float)$currency['rate'], 6);
$exchange_rate = round((float)$currency['rate'], 6);
break;
}
}
@@ -364,7 +364,7 @@ class CurrencyCore extends ObjectModel
}
if (isset($rate))
$this->conversion_rate = round($rate / $conversion_rate, 6);
$this->conversion_rate = round($rate / $exchange_rate, 6);
}
$this->update();
}
+1 -1
View File
@@ -273,7 +273,7 @@ class LanguageCore extends ObjectModel
'contact.html', 'contact.txt',
'contact_form.html', 'contact_form.txt',
'credit_slip.html', 'credit_slip.txt',
'download_product.html', 'download_product.txt', 'download-product.tpl',
'download_product.html', 'download_product.txt',
'employee_password.html', 'employee_password.txt',
'forward_msg.html', 'forward_msg.txt',
'guest_to_customer.html', 'guest_to_customer.txt',
+1 -1
View File
@@ -63,7 +63,7 @@ class OrderCore extends ObjectModel
/** @var string Payment module */
public $module;
/** @var float Currency conversion rate */
/** @var float Currency exchange rate */
public $conversion_rate;
/** @var boolean Customer is ok for a recyclable package */
@@ -38,7 +38,7 @@ class AdminCurrenciesControllerCore extends AdminController
'iso_code' => array('title' => $this->l('ISO code'), 'align' => 'center', 'width' => 80),
'iso_code_num' => array('title' => $this->l('ISO code number'), 'align' => 'center', 'width' => 120),
'sign' => array('title' => $this->l('Symbol'), 'width' => 20, 'align' => 'center', 'orderby' => false, 'search' => false),
'conversion_rate' => array('title' => $this->l('Conversion rate'), 'type' => 'float', 'align' => 'center', 'width' => 130, 'search' => false),
'conversion_rate' => array('title' => $this->l('Exchange rate'), 'type' => 'float', 'align' => 'center', 'width' => 130, 'search' => false),
'active' => array('title' => $this->l('Enabled'), 'width' => 25, 'align' => 'center', 'active' => 'status', 'type' => 'bool', 'orderby' => false),
);
@@ -130,12 +130,12 @@ class AdminCurrenciesControllerCore extends AdminController
),
array(
'type' => 'text',
'label' => $this->l('Conversion rate:'),
'label' => $this->l('Exchange rate:'),
'name' => 'conversion_rate',
'size' => 3,
'maxlength' => 11,
'required' => true,
'desc' => $this->l('Conversion rates are calculated from one unit of your shop\'s default currency. For example, if the default currency is euros and your chosen currency is dollars, type "1.20"').' 1&euro; = $1.20',
'desc' => $this->l('Exchange rates are calculated from one unit of your shop\'s default currency. For example, if the default currency is euros and your chosen currency is dollars, type "1.20"').' 1&euro; = $1.20',
),
array(
'type' => 'select',
@@ -144,7 +144,7 @@ class AdminLanguagesControllerCore extends AdminController
'required' => true,
'size' => 2,
'maxlength' => 5,
'desc' => $this->l('Full language code (e.g. EN-US, PT-BR)')
'desc' => $this->l('IETF language tag (e.g. en-US, pt-BR).').' '.sprintf('<a href="http://en.wikipedia.org/wiki/IETF_language_tag" target="_blank">%s <img src="../img/admin/external_link.png" class="icon-top" /></a>', $this->l('IETF on Wikipedia'))
),
array(
'type' => 'text',
+1 -1
View File
@@ -976,7 +976,7 @@ class AdminOrdersControllerCore extends AdminController
// Update currency in order
$order->id_currency = $currency->id;
// Update conversion rate
// Update exchange rate
$order->conversion_rate = (float)$currency->conversion_rate;
$order->update();
}