1 reply [Last post]
slayerment's picture
Offline
Uber Donor
Joined: 01/06/2008
Juice: 86
Was this information Helpful?

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

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Can you add multiple footers to TAPIr?

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.