diff --git a/admin/themes/default/template/controllers/modules_catalog/modules_list.tpl b/admin/themes/default/template/controllers/modules_catalog/modules_list.tpl
index 22113e45c..9721a7c63 100644
--- a/admin/themes/default/template/controllers/modules_catalog/modules_list.tpl
+++ b/admin/themes/default/template/controllers/modules_catalog/modules_list.tpl
@@ -35,11 +35,12 @@
{/if}
diff --git a/classes/module/Module.php b/classes/module/Module.php
index 95d78ca09..5dd18e9d6 100644
--- a/classes/module/Module.php
+++ b/classes/module/Module.php
@@ -1665,17 +1665,9 @@ abstract class ModuleCore
if ($item->type == 'addonsMustHave') {
$item->addons_buy_url = strip_tags((string)$modaddons->url);
$prices = (array)$modaddons->price;
- $id_default_currency = Configuration::get('PS_CURRENCY_DEFAULT');
- foreach ($prices as $currency => $price) {
- if ($id_currency = Currency::getIdByIsoCode($currency)) {
- $item->price = (float)$price;
- $item->id_currency = (int)$id_currency;
-
- if ($id_default_currency == $id_currency) {
- break;
- }
- }
+ foreach ($prices as $key => $value) {
+ $item->{$key} = $value;
}
}
diff --git a/controllers/admin/AdminModulesCatalogController.php b/controllers/admin/AdminModulesCatalogController.php
index 6fb11effa..0fe997e85 100644
--- a/controllers/admin/AdminModulesCatalogController.php
+++ b/controllers/admin/AdminModulesCatalogController.php
@@ -256,15 +256,23 @@ class AdminModulesCatalogControllerCore extends AdminController
if ($criteria == 'name') {
return strnatcasecmp($a->displayName, $b->displayName);
} else if ($criteria == 'price_increasing') {
- if (isset($a->price) && isset($b->price))
- return $a->price > $b->price;
- else if (isset($b->price) && $b->price)
- return true;
+ $priceA = $priceB = 0;
+ if (isset($a->price)) {
+ $priceA = $a->price;
+ }
+ if (isset($b->price)) {
+ $priceB = $b->price;
+ }
+ return $priceA > $priceB;
} else if ($criteria == 'price_decreasing') {
- if (isset($a->price) && isset($b->price))
- return $a->price < $b->price;
- else if (isset($b->price) && $b->price)
- return true;
+ $priceA = $priceB = 0;
+ if (isset($a->price)) {
+ $priceA = $a->price;
+ }
+ if (isset($b->price)) {
+ $priceB = $b->price;
+ }
+ return $priceA < $priceB;
}
});