Solan Posted September 25, 2009 Posted September 25, 2009 Before i could change my categorie order from: Movies Books Newspapers to Newspappers Books Movies What is wrong why cant i do that anymoore? I really need to manage the orders of my catagories... Thanks in advance! :)
Guest Posted September 25, 2009 Posted September 25, 2009 Edit the category and change the sort order. Lowest sort number is placed first Chris
Solan Posted September 25, 2009 Author Posted September 25, 2009 Edit the category and change the sort order. Lowest sort number is placed first Chris Thanks Chris but i cant do so, the category sort order icon is missing.. its only there if i add a whole new category :( Something wrong in the code but i dont know where to look or how it should look like in the files..
♥ecartz Posted September 30, 2009 Posted September 30, 2009 It's this section of code in a standard admin/categories.php file (around lines 894-911): case 'edit_category': $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_EDIT_CATEGORY . '</b>'); $contents = array('form' => tep_draw_form('categories', FILENAME_CATEGORIES, 'action=update_category&cPath=' . $cPath, 'post', 'enctype="multipart/form-data"') . tep_draw_hidden_field('categories_id', $cInfo->categories_id)); $contents[] = array('text' => TEXT_EDIT_INTRO); $category_inputs_string = ''; $languages = tep_get_languages(); for ($i = 0, $n = sizeof($languages); $i < $n; $i++) { $category_inputs_string .= '<br>' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . tep_draw_input_field('categories_name[' . $languages[$i]['id'] . ']', tep_get_category_name($cInfo->categories_id, $languages[$i]['id'])); } $contents[] = array('text' => '<br>' . TEXT_EDIT_CATEGORIES_NAME . $category_inputs_string); $contents[] = array('text' => '<br>' . tep_image(DIR_WS_CATALOG_IMAGES . $cInfo->categories_image, $cInfo->categories_name) . '<br>' . DIR_WS_CATALOG_IMAGES . '<br><b>' . $cInfo->categories_image . '</b>'); $contents[] = array('text' => '<br>' . TEXT_EDIT_CATEGORIES_IMAGE . '<br>' . tep_draw_file_field('categories_image')); $contents[] = array('text' => '<br>' . TEXT_EDIT_SORT_ORDER . '<br>' . tep_draw_input_field('sort_order', $cInfo->sort_order, 'size="2"')); $contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_save.gif', IMAGE_SAVE) . ' <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&cID=' . $cInfo->categories_id) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'); break; Note the line that says TEXT_EDIT_SORT_ORDER. Always back up before making changes.
Patty Posted January 19, 2010 Posted January 19, 2010 I think there's a but on the code, but I don't know how to fix it. Never noticed it before until a client asked about it today. By default, categories are sorted alphabetically. He wanted to change the order, so he used the numbers to order them. But then he changed this mind and wanted to go back to alphabetical, but even if he deletes the number on the sort order field, there will be a zero instead and that category won't go back in order, being placed at the bottom. How can I fix this? A work around would be to use 0 for all categories, but he has tons of them and that would be too much work, plus it wouldn't be the correct way to do it. Can anybody help?? Patty
Recommended Posts
Archived
This topic is now archived and is closed to further replies.