alfredomadrid Posted May 13, 2017 Share Posted May 13, 2017 Un saludo. En el footer, en el bloque categorías, me aparecen en el orden en que las cree, pero se lo quiero cambiar, ¿cómo puedo hacer esto? Prestashop 1.6.1.13 Link to comment Share on other sites More sharing options...
Sergio Ruiz Posted May 13, 2017 Share Posted May 13, 2017 Un saludo. En el footer, en el bloque categorías, me aparecen en el orden en que las cree, pero se lo quiero cambiar, ¿cómo puedo hacer esto? Prestashop 1.6.1.13 El TPL del bloque de categorías del Footer es: /themes/default-bootstrap/modules/blockcategories/blockcategories_footer.tpl Y en el fichero: modules/blockcategories/blockcategories.php Dentro de: public function hookFooter($params) Tienes una consulta SQL Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' SELECT DISTINCT c.id_parent, c.id_category, cl.name, cl.description, cl.link_rewrite FROM `'._DB_PREFIX_.'category` c '.Shop::addSqlAssociation('category', 'c').' LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON (c.`id_category` = cl.`id_category` AND cl.`id_lang` = '.(int)$this->context->language->id.Shop::addSqlRestrictionOnLang('cl').') LEFT JOIN `'._DB_PREFIX_.'category_group` cg ON (cg.`id_category` = c.`id_category`) WHERE (c.`active` = 1 OR c.`id_category` = '.(int)Configuration::get('PS_ROOT_CATEGORY').') '.((int)($maxdepth) != 0 ? ' AND `level_depth` <= '.(int)($maxdepth) : '').' AND cg.`id_group` IN ('.pSQL($groups).') ORDER BY `level_depth` ASC, '.(Configuration::get('BLOCK_CATEG_SORT') ? 'cl.`name`' : 'category_shop.`position`').' '.(Configuration::get('BLOCK_CATEG_SORT_WAY') ? 'DESC' : 'ASC'))) Por otro lado en el propio modulo bloque de categorías (en su configuración en la pestaña módulos -> módulos) que puedes ver en modulos - modulos te deja seleccionar ordenar por nombre/posicion, (ascendente/descendente) 1 Link to comment Share on other sites More sharing options...
alfredomadrid Posted May 14, 2017 Author Share Posted May 14, 2017 El TPL del bloque de categorías del Footer es: /themes/default-bootstrap/modules/blockcategories/blockcategories_footer.tpl Muchas gracias. Ya lo solucioné. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now