Welcome to WebmasterWorld Guest from 54.144.7.239

Forum Moderators: rogerd & travelin cat

Message Too Old, No Replies

Is there a way to change the numerical order in a drop down menu?

     
7:14 pm on Aug 26, 2011 (gmt 0)

New User

5+ Year Member

joined:July 14, 2011
posts: 38
votes: 0


Hi,
I've created an e-shop selling baby clothing.
I used WP E-Commerce for this and it was pretty simple.
However, there's one small problem.
If someone wants to buy a t-shirt, which comes in the following baby sizes: 000 (which is the smallest size), 00, 0 and 1, then the drop down menu shows it as:
0
00
000
1

That's understandable, as it sees 0 and being smaller than 00.

However, is there a way around this, so the drop down shows
000
00
0
1
10:19 pm on Aug 26, 2011 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member lorax is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Mar 31, 2002
posts:7575
votes: 0


Welcome to WebmasterWorld!
I have loads of issues with that plugin. Very hard to customize. Short answer is I don't have a solution for you. Sorry. :(
10:48 pm on Aug 26, 2011 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Dec 15, 2003
posts:2606
votes: 0


I haven't seen the plugin but if you can find the query that selects for that drop-down you can cchange the sort order.

I was playing around with ways to affect the sort order but wasn't able to come up with anything that wasn't ugly.

This is the best I could come up with and it isn't pretty.... BUT it would work.

select *, 1 as slug from product where size_field = '000'
Union
select *, 2 as slug from product where size_field = '00'
Union
select *, 3 as slug from product where size_field = '0'
Union
select *, 4 as slug from product where size_field not in ('0', '00', '000') order by slug, size_field
3:39 pm on Aug 27, 2011 (gmt 0)

New User

5+ Year Member

joined:July 14, 2011
posts: 38
votes: 0


Thanks for both your replies.
Demaestro, I hardly know anything about programming (yet), so not sure how to find the query.