I have a new field in my product table, it’s called sa_message_id and it is a number. I would like to be able to sort product by sa_message_id in customers product pages.
Anyone knows how can I do it?
png upload
Many thanks.
This is an old topic, but I would like to second this question, as I am trying to do something almost the same.
I have added several custom product fields to a new DB table, and these have been successfully integrated into the admin product editor and frontend. I would also like to have these custom fields available for sorting/filtering/searching.
I have gotten so far as to hook into the products_sorting function, so as to add the additional option to the sorting array. But this just adds the name to the list, and doesn't actually have any connection to the data field. When I switch to sort by a custom field, it makes a request to a url with my sorting option name, ie
sort_by=custom_field_name
but this obviously doen't have any effect.
Anyone know what else I might need to hook into to add these as possible sorting/searching/filtering options?
Thanks,
Andrew