Zen Cart Logo

Catagory Order

Locked

Views: 1,929

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
12 Jun 2006, 3:25 PM
#1
vjsibley avatar

vjsibley

New Zenner

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

12 Jun 2006, 10:31 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

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.

12 Jun 2006, 11:14 PM
#3
vjsibley avatar

vjsibley

New Zenner

Join Date:
Jan 2005
Posts:
8
Plugin Contributions:
0

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

13 Jun 2006, 12:05 AM
#4
vjsibley avatar

vjsibley

New Zenner

Join Date:
Jan 2005
Posts:
8
Plugin Contributions:
0

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

13 Jun 2006, 5:18 AM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Catagory Order

line 19:```
$querydrop = "select parent_id,categories_id from zen_categories";


try this:```
$querydrop = "select parent_id,categories_id from zen_categories order by sort_order";
13 Jun 2006, 11:59 AM
#6
vjsibley avatar

vjsibley

New Zenner

Join Date:
Jan 2005
Posts:
8
Plugin Contributions:
0

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