[-] FO : Fix bug #PSCFV-8412 no zipcode for countries when default country has no zip code in adress format

This commit is contained in:
gRoussac
2013-06-25 16:17:58 +02:00
parent 4627768092
commit 699053da27
7 changed files with 70 additions and 13 deletions
+5 -2
View File
@@ -433,8 +433,11 @@ class ToolsCore
{
// get currency from context
$currency = Shop::getEntityIds('currency', Context::getContext()->shop->id);
$cookie->id_currency = $currency[0]['id_currency'];
return Currency::getCurrencyInstance((int)$cookie->id_currency);
if (isset($currency[0]) && $currency[0]['id_currency'])
{
$cookie->id_currency = $currency[0]['id_currency'];
return Currency::getCurrencyInstance((int)$cookie->id_currency);
}
}
}
$currency = Currency::getCurrencyInstance(Configuration::get('PS_CURRENCY_DEFAULT'));