Results 1 to 8 of 8
  1. #1
    Join Date
    Oct 2011
    Location
    Kent, UK
    Posts
    50
    Plugin Contributions
    0

    Default Category sort order help

    Hi all,

    Our homepage (www.nee dth atg ift .co.uk) currently has a list of categories in the left sidebar, and the same categories plus images in the centre.

    I've managed to customise the category sort order, but ideally what I'd like to do is have an alphabetical sort order in the left sidebar but retain the custom sort order in the centre. Is this possible?

    Thanks in advance

  2. #2
    Join Date
    Oct 2011
    Location
    Kent, UK
    Posts
    50
    Plugin Contributions
    0

    Default Re: Category sort order help

    bump

    can anyone help?

  3. #3
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,267
    Plugin Contributions
    3

    Default Re: Category sort order help

    This cannot be done... Unless of course you want to write hundreds of lines of code... (perhaps thousands of lines).
    20 years a Zencart User

  4. #4
    Join Date
    Oct 2011
    Location
    Kent, UK
    Posts
    50
    Plugin Contributions
    0

    Default Re: Category sort order help

    Bah. That's a shame... thanks anyway.

  5. #5
    Join Date
    Oct 2011
    Location
    Kent, UK
    Posts
    50
    Plugin Contributions
    0

    Default Re: Category sort order help

    Just a quick update in case anyone else has the same problem... I've managed to get round this (up to a point) by using a blank sidebox in place of the category menu on the left.

    As we already had one instance of blank sidebox, I changed all filenames and references within these files from "blank_sidebox" to "category_sidebox".

  6. #6
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,267
    Plugin Contributions
    3

    Default Re: Category sort order help

    Quote Originally Posted by igi2011 View Post
    Just a quick update in case anyone else has the same problem... I've managed to get round this (up to a point) by using a blank sidebox in place of the category menu on the left.

    As we already had one instance of blank sidebox, I changed all filenames and references within these files from "blank_sidebox" to "category_sidebox".
    Yes... a good solution!

    As you know, however... the list in the blank sidebox must be MANUALLY edited.

    I was actually wondering if this couldn't be achieved by using two PRODUCT TYPES (Product General and Document General), where you create similar categories, then LINK all products to the relevant categories.

    You could use the documents categories sidebox for the left, and hide the convetional sidebox, but continue to display categories on main page.

    we did something SIMILAR HERE.

    See the nav cat tabs menu (horizontal menu bar) and the cateogries menu are different... The menu bar uses product_general and the sidebox uses document_general
    20 years a Zencart User

  7. #7
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Category sort order help

    It might be possible to set the sort in the categories sidebox differently by altering the select in /includes/classes/sideboxes/categories_tree.php. There are four sections like this:
    PHP Code:
        $this->tree = array();
        if (
    $product_type == 'all') {
          
    $categories_query "select c.categories_id, cd.categories_name, c.parent_id, c.categories_image
                                 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)$_SESSION['languages_id'] . "'
                                 and c.categories_status= 1
                                 order by sort_order, cd.categories_name"
    ;
        } else { 
    If you added a test for whether it was being used in a sidebox (not sure how you would test for that, or if it is actually necessary), you could switch the
    order by sort_order, cd.categories_name";
    to
    order by cd.categories_name, sort_order";
    where desired (perhaps always).

    I don't know if that by itself would take care of the display order properly, but it might be worth trying.
    Last edited by gjh42; 29 Oct 2011 at 01:16 AM.

  8. #8
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Category sort order help

    Looking at this some more, this query only addresses top categories, ordering first by sort order and then by name, so it should work simply as described. If you don't need the cat-tabs to display differently from the categories sidebox, just switching the order should work without any testing needed.

 

 

Similar Threads

  1. v151 Product Sort within Category - having problems changing the default sort order
    By Don Wagner in forum Customization from the Admin
    Replies: 4
    Last Post: 21 Oct 2012, 03:03 AM
  2. Category Sort Order
    By JSpencer in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 2 Mar 2011, 02:17 AM
  3. Sort Order in Category
    By Sawtooth500 in forum General Questions
    Replies: 5
    Last Post: 27 Mar 2010, 07:36 PM
  4. category sort order by language
    By ckalech in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 8 Feb 2008, 10:33 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg