didn't quite work for me

Posts: 24
Joined: 02/28/2008

Didn't quite work for me. I am using beta6.
The product name column was thrown off, see screen attachment. I used the function below.

any help is greatly appreciated.

<?php
function mymodule_table_alter($table_id, $op, $args = null) {

  if(
$table_id == 'uc_cart_view_table') {
    switch (
$op){
     case
'fields':
      
$fields[] = array('name' => 'model',
        
'title' => t('SKU'),
        
'weight' => 1,
        
'enabled' => true,
       );
       return
$fields;
     case
'data':
      foreach (
$args['#parameters'][1] as $item) {
       
$data['model'][] = $item->model;
      }
      return
$data;  
   }
}
}
?>

AttachmentSize
scr.gif27.03 KB
add SKU to cart? By: sprugman (17 replies) Thu, 01/03/2008 - 18:35