At the moment UC2 supports the addition of columns to the product table via hook_tapir_table_alter(). Unfortunately, it's not possible to sort those additional columns because the code building the ORDER query clause have no way of finding out these new columns. Talking with Ryan we came up with the plan to add a new hook, hook_tapir_table_header_alter(), that is to be called before the query is built.
I'll write the patch on Monday.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | 477102_200907081603-0400.patch | 5.6 KB | sammys |
| #5 | 477102_200906211224-0400.patch | 2.79 KB | sammys |
| #2 | 477102_200906011301+1000.patch | 2.75 KB | sammys |
Comments
Comment #1
rszrama commentedSubscribin', yo.
Comment #2
sammys commentedPatch attached. Also memory cached the product table header so it doesn't need to be altered twice when the catalog is built.
Comment #3
Island Usurper commentedPatch doesn't apply anymore, though it's easy enough to figure out by hand. Update to DRUPAL-6--2.
However, I'd also like to see an example implementation added to docs/hooks.php. It doesn't have to be completely fleshed out, just enough to give people an idea of what they have to work with.
Comment #4
sammys commented*DELETED*
Comment #5
sammys commentedHere is an updated patch to apply to 6.x-2.x. I'll add the example during the week.
Comment #6
rszrama commentedComment #7
sammys commentedHere's a patch with hook docs for both hook_tapir_table_alter() and hook_tapir_table_header_alter() complete with example code.
Comment #8
Island Usurper commentedThanks a bunch, Sammy.
Committed with a small change to the hooks' documentation. The api.module parser expects a one-line summary in its own paragraph at the top of the comment. I just rearranged some words to make the first sentence fit in one line.