// categories multishop improved
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@12866 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -176,6 +176,7 @@ class BlockCategories extends Module
|
||||
FROM `'._DB_PREFIX_.'category` c
|
||||
LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON (c.`id_category` = cl.`id_category` AND cl.`id_lang` = '.$id_lang.$this->context->shop->addSqlRestrictionOnLang('cl').')
|
||||
LEFT JOIN `'._DB_PREFIX_.'category_group` cg ON (cg.`id_category` = c.`id_category`)
|
||||
LEFT JOIN `'._DB_PREFIX_.'category_shop` cs ON (cs.`id_category` = c.`id_category` AND cs.`id_shop` = '.(int)Context::getContext()->shop->getID(true).')
|
||||
WHERE (c.`active` = 1 OR c.`id_category` = 1)
|
||||
'.((int)($maxdepth) != 0 ? ' AND `level_depth` <= '.(int)($maxdepth) : '').'
|
||||
AND cg.`id_group` IN ('.pSQL($groups).')
|
||||
@@ -186,9 +187,11 @@ class BlockCategories extends Module
|
||||
FROM `'._DB_PREFIX_.'category` c
|
||||
LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON (c.`id_category` = cl.`id_category` AND cl.`id_lang` = '.$id_lang.$this->context->shop->addSqlRestrictionOnLang('cl').')
|
||||
LEFT JOIN `'._DB_PREFIX_.'category_group` cg ON (cg.`id_category` = c.`id_category`)
|
||||
LEFT JOIN `'._DB_PREFIX_.'category_shop` cs ON (cs.`id_category` = c.`id_category`)
|
||||
WHERE (c.`active` = 1 OR c.`id_category` = 1)
|
||||
'.((int)($maxdepth) != 0 ? ' AND `level_depth` <= '.(int)($maxdepth) : '').'
|
||||
AND cg.`id_group` IN ('.pSQL($groups).')
|
||||
AND cs.`id_shop` = '.(int)Context::getContext()->shop->getID(true).'
|
||||
GROUP BY id_category
|
||||
ORDER BY `level_depth` ASC, '.(Configuration::get('BLOCK_CATEG_SORT') ? 'cl.`name`' : 'c.`position`').' '.(Configuration::get('BLOCK_CATEG_SORT_WAY') ? 'DESC' : 'ASC')))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user