I'd like to add a custom attribute to listing products toolbar. This is a dropdown attribute, that looks like this:
- Available today
- Available in 1-5 days
- Available in 5-10 days
I have set "Used for Sorting in Product Listing" to "Yes" in attribute's configuration. As a result, products are sorted by the attributes text. But that's not correct.
I'd like to somehow ovveride the sorting function, and force it to sort this particular attribute by the attribute value ids, not the attribute value labels:
- Available today (value id = 842)
- Available in 1-5 days (value id = 843)
- Available in 5-10 days (value id = 844)
Is that possible? Any ideas or guidelines?
What is the function that I could change to do this?