// Fix multilang on multishop #PSTEST-588

This commit is contained in:
rMalie
2012-02-02 10:27:58 +00:00
parent 80eaa73dc9
commit 9ca2b46af2
2 changed files with 6 additions and 2 deletions
+5 -1
View File
@@ -685,7 +685,11 @@ class LanguageCore extends ObjectModel
public static function countActiveLanguages()
{
if (!self::$countActiveLanguages)
self::$countActiveLanguages = Db::getInstance()->getValue('SELECT COUNT(*) FROM `'._DB_PREFIX_.'lang` WHERE `active` = 1');
self::$countActiveLanguages = Db::getInstance()->getValue('
SELECT COUNT(*) FROM `'._DB_PREFIX_.'lang` l
'.Context::getContext()->shop->addSqlAssociation('lang', 'l').'
WHERE l.`active` = 1
');
return self::$countActiveLanguages;
}
+1 -1
View File
@@ -304,7 +304,7 @@ class FrontControllerCore extends Controller
'come_from' => Tools::getHttpHost(true, true).Tools::htmlentitiesUTF8(str_replace('\'', '', urldecode($_SERVER['REQUEST_URI']))),
'cart_qties' => (int)$cart->nbProducts(),
'currencies' => Currency::getCurrencies(),
'languages' => Language::getLanguages(),
'languages' => Language::getLanguages(true, $this->context->shop->getID()),
'priceDisplay' => Product::getTaxCalculationMethod(),
'add_prod_display' => (int)Configuration::get('PS_ATTRIBUTE_CATEGORY_DISPLAY'),
'shop_name' => Configuration::get('PS_SHOP_NAME'),