19 lines
427 B
PHP
19 lines
427 B
PHP
|
<?php
|
||
|
|
||
|
class Category extends CategoryCore
|
||
|
{
|
||
|
public static function getNameStatic($id_category)
|
||
|
{
|
||
|
$id_lang = Context::getContext()->language->id;
|
||
|
|
||
|
$sql = '
|
||
|
SELECT cl.`name`
|
||
|
FROM `'._DB_PREFIX_.'category_lang` cl
|
||
|
WHERE `id_lang` = '.(int)$id_lang.'
|
||
|
'.Shop::addSqlRestrictionOnLang('cl').'
|
||
|
AND cl.`id_category` = '.(int)$id_category.'
|
||
|
';
|
||
|
|
||
|
return Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($sql);
|
||
|
}
|
||
|
}
|