Okay, I'm still wrestling with this code, and to top it off my partner and I keep changing our minds as to how to approach the navigation for our site.
At the moment, I am using the famous "Fernando Code", but the sort order is by alphabet. I have tried various changes to the "include/categories.php" page (see
http://forum.x-cart.com/viewtopic.php?t=11876&highlight=categories+php), but the subcategory menu continues to list in alphabetical order. I think I need to sort the order in his code somehow, but I don't know how. Here's his code again, added of course to categories.tpl:
Code:
{* Added by Fernando. Show first level of subcategories *}
{if $current_category ne "" }
{section name=subcat loop=$allcategories}
{assign var=topmostcat value=$allcategories[subcat].categoryid_path|regex_replace:"/\/.*/":""}
{assign var=current_category_top value=$current_category.categoryid_path|regex_replace:"/\/.*/":""}
{if $current_category_top eq $topmostcat and $categories[cat_num].categoryid eq $topmostcat and $allcategories[subcat].parentid eq $topmostcat and $allcategories[subcat].categoryid ne $current_category_top}
{$allcategories[subcat].category|truncate:20:"...":true}
{/if}
{/section}
{/if}
{* End added by Fernando *}
I'm thinking there's got to be code I can add to his that will allow me to sort the list by "order_by" (POS) instead. Can anyone help me with this?