, cl.description_long,
так, запятую одну удалите
Странно, но теперь подкатегории пропали на странице вывода, может что-то не так сделал?
<?php
class Category extends CategoryCore {
/*
* module: customfieldcategory
* date: 2020-12-09 06:39:03
* version: 1.0
*/
public $description_long;
/*
* module: customfieldcategory
* date: 2020-12-09 06:39:03
* version: 1.0
*/
public function __construct($id_category = null, $id_lang = null, $id_shop = null){
self::$definition['fields']['description_long'] = array('type' => self::TYPE_HTML, 'lang' => true);
parent::__construct($id_category, $id_lang, $id_shop);
}
public function getSubCategories($id_lang, $active = true)
{
if (!Validate::isBool($active)) {
die(Tools::displayError());
}
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
SELECT c.*, cl.id_lang, cl.name, cl.description, cl.link_rewrite, cl.meta_title, cl.meta_keywords, cl.description_long, cl.meta_description
FROM `' . _DB_PREFIX_ . 'cms_category` c
LEFT JOIN `' . _DB_PREFIX_ . 'cms_category_lang` cl ON (c.`id_cms_category` = cl.`id_cms_category` AND `id_lang` = ' . (int) $id_lang . ')
WHERE `id_parent` = ' . (int) $this->id . '
' . ($active ? 'AND `active` = 1' : '') . '
GROUP BY c.`id_cms_category`
ORDER BY `name` ASC');
// Modify SQL result
foreach ($result as &$row) {
$row['name'] = CMSCategory::hideCMSCategoryPosition($row['name']);
}
return $result;
}
};