2 replies [Last post]
VitaLife's picture
Offline
Bug Finder
Joined: 10/29/2007
Juice: 249
Was this information Helpful?

I'm trying to modify my /cart page to have an image to the left of the cart list. Adding the image was pretty easy by overriding cart_view_form and putting the image in top of the theme override

<?php
  $output
= '<div id="cart-form-products"><img src=/img/big_cart.jpg align=left>'
         
. tapir_get_table('uc_cart_view_table', $form) .'</div>';
?>

Now the problem is I cannot for the life of me get the uc_cart_view_table to change it's width. I've tried to use form_alter, and also used hook_table_alter (but this does not appear to let me use case attributes). So far the only way I have been able to modify the width of this table is changing this code is uc_cart_view_table

<?php
  
case 'attributes':
     
$attributes = array('width' => '100%');
      return
$attributes;
?>

I know I can't make a core hack just to put an image on my cart page, so what's a better way to accomplish this?

Jim

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: How can I modify the attributes of a TAPIR table using form_

Hmm... I wish hook_table_alter() had been a better tool... at this point I'm wondering if you can accomplish what you want through CSS. Puzzled

VitaLife's picture
Offline
Bug Finder
Joined: 10/29/2007
Juice: 249
I never got it to work like I wanted

But I accomplished the same effect but modifying page.tpl.php to override the page title when arg(1) is cart