// Fix multilang on multishop #PSTEST-588
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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'),
|
||||
|
||||
Reference in New Issue
Block a user