[-] BO: Fix module listing with addons module with default currency not on the xml #PSCFV-8005
This commit is contained in:
1 parent
0f5f792bd8
commit
e3a47635aa
2 files changed
+6
-6
No files matched your search
@@ -18,7 +18,7 @@
|
|||||||
* needs please refer to http://www.prestashop.com for more information.
|
* needs please refer to http://www.prestashop.com for more information.
|
||||||
*
|
*
|
||||||
* @author PrestaShop SA <contact@prestashop.com>
|
* @author PrestaShop SA <contact@prestashop.com>
|
||||||
* @copyright 2007-2013 PrestaShop SA␍
|
* @copyright 2007-2013 PrestaShop SA
|
||||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*}
|
*}
|
||||||
@@ -87,7 +87,7 @@
|
|||||||
<ul id="list-action-button">
|
<ul id="list-action-button">
|
||||||
{if isset($module->type) && $module->type == 'addonsMustHave'}
|
{if isset($module->type) && $module->type == 'addonsMustHave'}
|
||||||
<li>
|
<li>
|
||||||
<a href="{$module->addons_buy_url}" target="_blank" class="button updated"><span><img src="../img/admin/cart_addons.png"> {displayPrice price=$module->price currency=$module->id_currency}</span></a>
|
<a href="{$module->addons_buy_url}" target="_blank" class="button updated"><span><img src="../img/admin/cart_addons.png"> {if isset($module->id_currency) && isset($module->price)}{displayPrice price=$module->price currency=$module->id_currency}{/if}</span></a>
|
||||||
</li>
|
</li>
|
||||||
{else}
|
{else}
|
||||||
{if $module->id && isset($module->version_addons) && $module->version_addons}
|
{if $module->id && isset($module->version_addons) && $module->version_addons}
|
||||||
|
|||||||
@@ -1177,12 +1177,12 @@ abstract class ModuleCore
|
|||||||
$id_default_currency = Configuration::get('PS_CURRENCY_DEFAULT');
|
$id_default_currency = Configuration::get('PS_CURRENCY_DEFAULT');
|
||||||
foreach ($prices as $currency => $price)
|
foreach ($prices as $currency => $price)
|
||||||
if ($id_currency = Currency::getIdByIsoCode($currency))
|
if ($id_currency = Currency::getIdByIsoCode($currency))
|
||||||
if ($id_default_currency == $id_currency)
|
{
|
||||||
{
|
|
||||||
$item->price = (float)$price;
|
$item->price = (float)$price;
|
||||||
$item->id_currency = (int)$id_currency;
|
$item->id_currency = (int)$id_currency;
|
||||||
}
|
if ($id_default_currency == $id_currency)
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$module_list[] = $item;
|
$module_list[] = $item;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user