Salvo Posted February 22, 2005 Share Posted February 22, 2005 Hi all I am trying to sort some model in a osc. But I have given a certain cretaria. a1, a2, a3.......a19, a20 and so on.... using order by, it comes as a1 a19 a2 a20 a3 How can I solve this problem and have: a1 a2 a3 a19 a20 etc etc.. Salvo Link to comment Share on other sites More sharing options...
wand Posted March 27, 2005 Share Posted March 27, 2005 Need it too! (seems much more logical than the way implemented, as 5 is less than 10). May be you guys give a point where to look/change (i know php)? Link to comment Share on other sites More sharing options...
Edze Posted March 27, 2005 Share Posted March 27, 2005 Hi all I am trying to sort some model in a osc. But I have given a certain cretaria. a1, a2, a3.......a19, a20 and so on.... using order by, it comes as a1 a19 a2 a20 a3 How can I solve this problem and have: a1 a2 a3 a19 a20 etc etc.. Salvo <{POST_SNAPBACK}> Hi, How about this: a01 a02 a03 a10 a11 or if you have a lot of products: a001 a002 a010 a011 a100 a101 a200 and so on... With kind regards, Edze Link to comment Share on other sites More sharing options...
Jeremy at oddly enough Posted March 27, 2005 Share Posted March 27, 2005 Edze has the correct solution, osc looks at the first number ofr ordering, then the second, etc. so you need to include zeros as place holders. Jeremy Link to comment Share on other sites More sharing options...
♥kymation Posted March 27, 2005 Share Posted March 27, 2005 If you can't change those model numbers, use the Sort Order contribution to assign an order. You can then sort your products in any order that you want. Regards Jim See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
wand Posted March 28, 2005 Share Posted March 28, 2005 When you already got 2000 items, there is no good in manual renaming all of them :) I'd rather stick with Sort Order contribution, but imho it's just silly, there _should_ be more elegant way. Really, I see no other way, though.... Link to comment Share on other sites More sharing options...
Jeremy at oddly enough Posted March 29, 2005 Share Posted March 29, 2005 I'd think the sort order contrib, is the more elegant way, then the sorting is hidden from view. Jeremy Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.