homepage Welcome to WebmasterWorld Guest from 54.145.172.149
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / WordPress
Forum Library, Charter, Moderators: lorax & rogerd

WordPress Forum

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



 
Msg#: 4355648 posted 7:14 pm on Aug 26, 2011 (gmt 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

 

lorax

WebmasterWorld Administrator lorax us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 4355648 posted 10:19 pm on Aug 26, 2011 (gmt 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. :(

Demaestro

WebmasterWorld Senior Member demaestro us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 4355648 posted 10:48 pm on Aug 26, 2011 (gmt 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

danepak



 
Msg#: 4355648 posted 3:39 pm on Aug 27, 2011 (gmt 0)

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

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / WordPress
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved