Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.

Sorting question dealing with numbers.

Locked

Started by redrumloa on 12 Aug 2006, 11:20 PM · Views: 2,045

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
12 Aug 2006, 11:31 PM
#2
patski avatar

patski

Zen Follower

Join Date:
Nov 2004
Location:
Deal, Kent, UK
Posts:
325
Plugin Contributions:
0

Post #2 by patski

Do you mean the item names aren't being correctly sorted? If so then they are according to the item name. In that context ie a text string, a number is just treated as more text therefore in an alpha listing you get 2,201,3,301 etc.

There are a number of places you can set sort orders - on the products themselves at the bottom of the entry page, or there are other settings in the various listing pages under Configuration which you could play around with.

12 Aug 2006, 11:36 PM
#3
redrumloa avatar

redrumloa

New Zenner

Join Date:
Aug 2006
Posts:
9
Plugin Contributions:
0

Post #3 by redrumloa

Hi!

Here's the problem. I am trying to use Easy Populate to upload very large quantites of products and Easy Populate does not have a field for sort order. By default Zen Cart sorts alphabetically correct, but chokes on numbers 1, 11, 100, etc THEN 2. I'm hoping there is a way for it to sort numbers ascending correctly, then I won't need a special sort field.

13 Aug 2006, 12:21 AM
#4
patski avatar

patski

Zen Follower

Join Date:
Nov 2004
Location:
Deal, Kent, UK
Posts:
325
Plugin Contributions:
0

Post #4 by patski

Never used EZPopulate so can't advise I'm afraid. I'm sure someone else will be along in a moment :smile:

13 Aug 2006, 1:21 AM
#5
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #5 by ajeh

Are you sorting based on products_name or based on products_sort_order

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

13 Aug 2006, 1:49 AM
#6
redrumloa avatar

redrumloa

New Zenner

Join Date:
Aug 2006
Posts:
9
Plugin Contributions:
0

Post #6 by redrumloa

Ajeh:

Are you sorting based on products_name or based on products_sort_order

Product Name

Thanks.

13 Aug 2006, 2:36 AM
#7
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #7 by ajeh

Product Name is text ...

As text, you have to write text in a proper alpha/numeric method

test 1
test 11
test 111
test 2
test 222
test 3
test 4

Or ...
test 1
test 11
test 111
test 2
test 222
test 3
test 4

Or ...
test 001
test 011
test 111
test 002
test 222
test 003
test 004

Or ...
Stick in your physical sort order ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

13 Aug 2006, 1:42 PM
#8
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #8 by ajeh

NOTE: a cleaner "Looking" way, but you may need to think a bit more ... as you are trying to force alpha sorts to visually look correct ...

It would be nice if computers had a clue and understood that:

test 1
test 2
test 11
test 22
test 222
test 111
test 3

Does not sort as:
test 1
test 11
test 111
test 2
test 3
test 22
test 222

So, when using alpha/numeric you have to help it a bit ...

Now, you could think out side the box and count spaces

If you know you will have:
Test 1
Test 11
Test 111

And not go higher than 3 digit ... multiple spaces do not show ... so enter the spaces ... where there visually is a space bar or the word space is written, hit the space bar between the Text and number:

Test spacespace1
Test 222
Test spacespace3
Test spacespace2
Test space22
Test space11
Test space33
Test spacespace4
Test 111
Test 333

Will sort correctly ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!