dp1726 Posted March 30, 2007 Posted March 30, 2007 Trying to figure a way to fix this problem in my store under products i need to change the order of my parts small number to larger. This is what I have now RB-1000-24 RB-2000-24 RB-250-24 RB-3000-24 RB-5000-24 RB-500-24 what I would like to get is RB-250-24 RB-500-24 RB-1000-24 RB-2000-24 I tried to remove the RB- but same problem Any ideas Thank you Dave
Guest Posted March 30, 2007 Posted March 30, 2007 where these entries are specified? Under the product's model? or product's name. And wha's the page name/script you need to alter this? There are ways and even contributions to sort the various product fields.
dp1726 Posted March 30, 2007 Author Posted March 30, 2007 Here the store http://www.dpglassblowing.com/catalog/index.php?cPath=22_24 if you look at the catalog numbers I need them smallest to large. I just cannot figure out why 250 comes after 2000 and 500 comes last. Thank you for looking. Dave
Guest Posted March 30, 2007 Posted March 30, 2007 Now I see, ok this looks like the product's model or some custom field. Ok the why is happening is simple. It will be sorted by the first characters as these are strings not numbers. If you have: 10 3 1 2 100 Sorting by name will display 1 10 100 2 3 So either you write a dedicated script to sort certain characters differently (ie sort them as numbers not strings) or you could specify a sort order (using a contribution or something) for the products which is time consuming to administer. Perhaps the easiest will be to setup a script in your osc admin for the categories.php to generate a unique number by combining this catalog digits together for each entry inserted. And then you sort products based on that entry.
dp1726 Posted March 30, 2007 Author Posted March 30, 2007 As far as I php script, that's a lot more than I can handle at this point. I was hoping that there was a numerical way to sort. If I have to I can change from RB-250 to 250-RB-24. I try a search in Contributions. Thank You for the help. Dave
Guest Posted March 30, 2007 Posted March 30, 2007 As far as I php script, that's a lot more than I can handle at this point.I was hoping that there was a numerical way to sort. If I have to I can change from RB-250 to 250-RB-24. I try a search in Contributions. Thank You for the help. Dave No matter how you order the characters won't help you because these are treated like strings not numbers, as I mentioned.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.