rickobee:
Anyhow, as I mentioned, I was hoping there might be a way to manually sort a small group (a particular comic series, for example). A workaround, a mod, a secret trick!
Thanks for the suggestion, I appreciate it. I was really hoping for something a bit simpler...
There IS a 'simple trick' that you can use:
Instead of using descriptions like:
Super Fun Comics #1
Super Fun Comics #10
Super Fun Comics #17
Super Fun Comics #2
Super Fun Comics #23
Super Fun Comics #3
Super Fun Comics #36
You'll need to 'pad' the 'numeric' strings out with zeros, like:
Super Fun Comics #01
Super Fun Comics #10
Super Fun Comics #17
Super Fun Comics #02
Super Fun Comics #23
Super Fun Comics #03
Super Fun Comics #36
This will then cause the sorted display to show as:
Super Fun Comics #01
Super Fun Comics #02
Super Fun Comics #03
Super Fun Comics #10
Super Fun Comics #17
Super Fun Comics #23
Super Fun Comics #36
Needless to say, if there are more than 99 Comics you'll need to use three digit numbers, such as:
Super Fun Comics #001
Super Fun Comics #002
Super Fun Comics #003
Super Fun Comics #010
Super Fun Comics #017
Super Fun Comics #023
Super Fun Comics #036
Super Fun Comics #150
Super Fun Comics #300
etc, etc.
As mentioned, this isn't a zencart issue, and in spite of your statement that "When I access my files in Windows they're ordered as I'd expect" it is a universal issue that is not limited to any given operating system. It is an issue that goes back the the very core of computing because numbers are always lower in the ASCII tables than strings, so 1000 represented as a string "1000" is always going to appear before the number 200 represented as a string value of "200".
If a system does ever display a sorted set of strings such as
Super Fun Comics #1
Super Fun Comics #10
Super Fun Comics #17
Super Fun Comics #2
Super Fun Comics #23
Super Fun Comics #3
Super Fun Comics #36
in the 'correct' order of:
Super Fun Comics #1
Super Fun Comics #2
Super Fun Comics #3
Super Fun Comics #10
Super Fun Comics #17
Super Fun Comics #23
Super Fun Comics #36
It is actually done splitting the strings into their different 'elements' and performing a sort on each element. IOW, it'll first sort all of the "Super", then all the 'Fun", following by the "Comics", and finally by the numeric equivalent of the number strings. All things considered, this adds up to a lot of CPU power for such a simple requirement. Most coders would never go to this extent with a sort routine unless there is a real proven need for it. It'd be easier to separate the string component and the numeric components in the first place.
Important thing to note is that the TEXT STRING "1" is NOT the same as the NUMBER "1", and to take this one step further, you could also have a graphic picture that shows a "1", and needless to say, even though this "1" will look the same as the text and numeric '1's this won't work correctly in a sort function either.
Hopefully this explanation goes a little way to helping you accept the situation, as well as grasp it. :)
Cheers
Rod
NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.
Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.