Ubercart Numerical Attributes Not Respecting List Position Settings I have an attribute option select box field that has numerical options, like this:

LENGTH
1
1.5
2
10
100


However, this is how the options are displaying on the front-end view of the product:

LENGTH
1
1.5
10
100
2


As you can see, it is sorting anything that starts with a "1" before anything that starts with a "2". I need it to be in literal numerical format.

Any ideas on how I can make this work the way I need it to?

Thanks!
Ubercart manages options twice. First in the overall (global) attributes, which may be applied to any individual product, then in the realm of the individual product. Since the product may have only a subset of the global options selection, once you have applied an attribute to a product, you are able to select which options apply, and re-order the sort order for that product. The default sort in Drupal is alphabetical.

Edit your product, go to the options tab, and set the options order the way you want to see it. The select list will respect the order you set. (And yes, this will require you to repeat the process for every product.)

EDIT:

One possible way to brute force the ordering is with direct access to the database.

First go to /admin/store/products/attributes and open the options list(s) for your attribute(s). Drag and drop to get the options in the correct order, then save.

Then run the following query (after backing up your database in case it blows up):

UPDATE uc_product_options p JOIN uc_attribute_options a ON p.oid=a.oid SET p.ordering = a.ordering;


Just be aware that if you ever edit the attributes on a product, they will re-order with the selected options at the top, and the unselected options at the end of the list. You WILL have to double check the order before saving, as the selected attributes will probably be in alphabetical order.