Can you add multiple footers to TAPIr?

Posts: 26
Joined: 01/05/2008
Uber Donor

I am trying to add on to my shopping cart table and it looks like the table api is the way to do this. I have tried doing something like this:

<?php
function test_table_alter ($table_id, $op, $args) {
  if (
$table_id == 'uc_cart_view_table') {
    switch (
$op) {
      case
'data':
       
$data['#footer'][] = array('data' => 'row 1', 'colspan' => 5, 'align' => 'right');
       
$data['#footer'][] = array('data' => 'row 2', 'colspan' => 5, 'align' => 'right');
        return
$data;
    }
  }
}
?>

but I can't quite get it. Is there a way to add a few rows like the Subtotal row?

Thanks,
Quinton

Posts: 5624
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

I don't believe so, since technically there's just one footer with whatever stuff you need in it. You could feasibly add your new lines to the existing footer or replace it entirely with your own footer that includes the Subtotal row.