Jump to content

Alphabetically sort categories in add product menu?


Guest Made in Japan

Recommended Posts

Guest Made in Japan

I really need to alphabetically sort categories in add product menu. I have 457 categories and they're all kind of jumbled up in there, it takes 5-10 minutes sometimes to find the correct categories in the drop down box when adding new products. (see attachment) This seems like a really simple mod if you know what you're doing, but, well I don't know what I'm doing :)

This would really help me out, anyone willing to give it a look and tell me what I need to edit for this? I did do a mod posted in the free mods section to order the categories in the "Add category" page which is nice, but to search through that menu when adding a new product to an older category, it's killing me :/ We get shipments of 100+ books at a time a couple times a week.

Link to comment
Share on other sites

  • 5 years later...

I know we are up to V5 now and there is little interest in V3, but I would love to solve this one :-)

Ok, I have found the file that needs editing, it is admin/products/index.php and the lines that need attention are:

<?php for ($i=0; $i<count($categoryArray); $i++){ ?>

	<option value="<?php echo $categoryArray[$i]['cat_id']; ?>" <?php if(isset($results[0]['cat_id']) && $categoryArray[$i]['cat_id']==$results[0]['cat_id']) { echo "selected='selected'"; } ?>><?php echo getCatDir($categoryArray[$i]['cat_name'],$categoryArray[$i]['cat_father_id'], $categoryArray[$i]['cat_id']); ?></option>

	<?php } ?>

Unfortunately I have little experience with PHP so I'm stuck for now :-(

If I work it out I'll post the solution here, but in the meantime if any kind soul knows could you give us a clue?

T

Link to comment
Share on other sites

  • 2 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...