-
Notifications
You must be signed in to change notification settings - Fork 299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Orderable product options #114
Comments
We basically need a way to sort the options in the admin. Don't think it will be too hard to implement, I'm just unsure of the best interface for doing it. |
"...to sort the options in the admin"??? From my point of view it is important to get them sorted in the dropdown lists on the product page. I think, the first two variants can be implemented without big efforts... |
An admin user should be able to control the order of the options by going into the admin and sorting them in a drag/drop interface. With that in place, all the other approaches are redundant. As simple as they may be, they'd only be short-term so there's no point in adding them. |
"An admin user should be able to control the order of the options by going into the admin and sorting them in a drag/drop interface." - ok, and the implementation of it could be, for example, a hidden field "sort_order" |
Yes there'd be a hidden sort field. The way pages work isn't alternative, it's the same thing - hidden sort field with drag/drop ordering in the admin. |
Anyway, for my purposes a plain vanilla "sort by name" will be enough - is it possible to add it quickly? |
Put one line of JavaScript into the product template. |
Jquery to sort the first option. You can modify this to use wildcards if needed $("#id_option1").html($("#id_option1 option").sort(function (a, b) {
return a.text == b.text ? 0 : a.text < b.text ? -1 : 1
})); |
manually sorting products in the admin backend would be really, really, really nice. could work the same way as with pages. if theres is paging on the products site one drop area at the top and one at the bottom to drag and drop the item to the next page, could work. |
The dropdown list with product variations on the product page is unsorted. I have product variations which are numbers, so it is not a localization or NLS issue (the site is in russian)
Attached a picture of dropdown list and a picture from admin showing product options (properly sorted when I click on "name" column header)
The text was updated successfully, but these errors were encountered: