bugnet Posted February 6, 2013 Posted February 6, 2013 Hi there, I need some help, I don't know if theres already a contrib to do this, or some mod, but I want to the actual category, selected by visiting customer, to get on top of the others, so if he wants to explore down this subcategories it will become easier as its on top of the list, on 2.2 version, someone had done that ? believe it has to do with /includes/boxes/categories.php on the query $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '0' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name"); add before order by sort_order something like '. $cPath_array . ', right ? also there is something that counts clicks on categories to sort them by that ? so most selected categories will come on top ? thanks David \\Bugnet
germ Posted February 6, 2013 Posted February 6, 2013 Take a look at this. As far as I know it works. If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
bugnet Posted February 7, 2013 Author Posted February 7, 2013 Take a look at this. As far as I know it works. After some work and testing, came to just nothing, it doesnt work like that, but anyway is great for stock stores, but I didn't came to put the actual category on top of the others, changed the query line : $caminho = explode("_", $cPath); $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '0' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by c.categories_id = '" . $caminho[0] . "' DESC, c.sort_order, cd.categories_name"); seens to mess the sort order pretty well, but no go to what I want till now !
Recommended Posts
Archived
This topic is now archived and is closed to further replies.