Thread: Catagory Order

Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2005
    Posts
    8
    Plugin Contributions
    0

    Catagory Order

    Hello All,
    I have searched and searched the forum and can't find an answer to my problem. Probably just user dingyness :). Anywho, what I am trying to do is set up the catagories to sort alphabeticly and am running into problems. I am changeing some of the catagory names and when I do they don't resort. I went and inserted all new sort orders and that still didn't work. I still have to add some main catagories and don't want to if I cant seem to get this to work right. you can see what I'm talking about at http://www.anitasdream.com and notice that the first catagory is birdhouses and birdfeeders then it starts with the "C's" but then there is "boxes" with the "H's" because it used to be "Handmade Boxes". Lord I hope I'm not confusing ya'll. I basicly want my main catagories to be alphabatized using the sort order feature and not sorted by Catagory id#.

    Thanks in advance,
    VJ
    Last edited by vjsibley; 12 Jun 2006 at 04:29 PM.

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: Catagory Order

    Try, if you have not, in your admin > catalog > categories/products > then look to the far right:

    There you will find a dropdown for Categories/Product Display Order:: Set to categories name.

    See if that gets what you want.
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Jan 2005
    Posts
    8
    Plugin Contributions
    0

    Default Re: Catagory Order

    Hi there,
    Thanks for your idea. However it didn't work. It does sort them in the admin area but when I take a look at the home page, they are still not in alphabetical order. Anyone else have any other ideas?


    Thanks,
    VJ

  4. #4
    Join Date
    Jan 2005
    Posts
    8
    Plugin Contributions
    0

    Default Re: Catagory Order

    ok everyone,
    I have some more information. I suppose I should have mentioned that I am using the cool little fly out menu thing. now I was taking a gander at the code, and mind you I don't know much mysql, but I gathered my problem is within this code because when I removed it from the template...low and behold the catagories are in alpha order but in text form. So I opened up the tpl_catagories.php in my template and immed. on line 19 I saw the code to pull the catagories from parent_id and catagories_id. I saw this code on several other lines so I thought why not open up dreamweaver and do a find and replace all. well I'll tell you why not... I messes up the whole dang cart and pull up three errors on lines 19, 42, and 172. Yikes good thing I'm the back up Queen..LOL.

    So I am going to the library and grabing a book on databases. Meanwhile if anyone is inerested in the code I'm trying to tweak pull down the attachment. The goal here is to get this code to put the catagory names on the menu in alpha order using the sort order number I supply during the add catagory process. I can understand no one wanting to do the work for me as I don't really want that only I want to learn what I'm doing here and why I'm doing it...hence I'm getting a book. But still I don't really know where to start so any nudges in the right direction would be great, and be kind on the teckie stuff, I'm completely self taught so I pretty much am still getting the tech names commetted to memory for what I call a thingamajig...LOL

    Thanks in advance for all who look and give advice and possible soulutions.

    VJ
    Attached Files Attached Files
    Last edited by vjsibley; 13 Jun 2006 at 01:09 AM. Reason: Forgot to attach the file

  5. #5
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Catagory Order

    line 19:
    Code:
    $querydrop = "select parent_id,categories_id from zen_categories";
    try this:
    Code:
    $querydrop = "select parent_id,categories_id from zen_categories order by sort_order";
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  6. #6
    Join Date
    Jan 2005
    Posts
    8
    Plugin Contributions
    0

    Default Re: Catagory Order

    hello,

    ok I replaced line 19 with the above code and got this error message:



    Warning: Invalid argument supplied for foreach() in /home/content/a/n/i/anitasdr/html/includes/templates/anitasdream/sideboxes/tpl_categories.php on line 176




    So I went in and found that line 42 is the same as line 19 and again replace line 42 with the above code and still got error message:


    Warning: Invalid argument supplied for foreach() in /home/content/a/n/i/anitasdr/html/includes/templates/anitasdream/sideboxes/tpl_categories.php on line 176

    now the code on line 176 is:


    foreach ($subs[0] as $key1=>$row)




    and on the home page it just shows the "button" for HOME. This is a step in the right direction.


    Any Ideas would be appreciated.

    VJ

 

 

Similar Threads

  1. v150 My 10-digit Sort Order Numbers Not Updating for 1 Catagory
    By Allaction in forum Bug Reports
    Replies: 3
    Last Post: 21 Sep 2012, 05:25 PM
  2. How do I remove sub-catagory text if I have a catagory image?
    By curbsidestudiosNET in forum Templates, Stylesheets, Page Layout
    Replies: 11
    Last Post: 20 Feb 2011, 03:05 AM
  3. Copy sub catagory to sub catagory
    By tomharto in forum Setting Up Categories, Products, Attributes
    Replies: 9
    Last Post: 5 Apr 2010, 06:25 PM
  4. catagory order.
    By daver1982 in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 3 Jun 2009, 02:39 PM
  5. Catagory and Products in a Catagory
    By hales in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 23 Sep 2007, 03:11 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR