1 reply [Last post]
j_ten_man's picture
Offline
Joined: 03/07/2008
Juice: 78
Was this information Helpful?

So, I got the pane to show up on the edit page, I needed to use the 'edit-theme' case. Now, I am trying to process my form, but it doesn't act like it is calling my module?? Here is what I have:

<?php
function base_order_pane(){
 
$panes[] = array(
   
'id' => 'transcript',
   
'callback' => 'base_request_details',
   
'title' => t('Details'),
   
'desc' => t("Return details"),
   
'weight' => 7,
   
'show' => array('view', 'edit', 'customer'),
  );
}

function

base_request_details($op, $arg1){
  switch (
$op) {
    case
'customer':
    case
'view':
     
$view = tapir_get_table('op_address_base_view_table', $arg1->base['addresses']);
      if(
$arg1->base['instructions'] != ""){
       
$view .= "<b>".t('Special Instructions: ')."</b>".check_plain($arg1->base['instructions']);
      }
      return
$view;

    case

'edit-form':
     
$form['base'] = array(
      
'#type' => 'fieldset',
          
'#title' => t('Base Details'),
          
'#collapsible' => TRUE,
          
'#collapsed' => FALSE,
         );
     
$form['base']['test'] = array('#type'=>'textfield', '#title'=>t('Base'),);
      return
$form;

    case

'edit-theme':
      return
drupal_render($arg1['base']);

    case

'edit-process':
       
db_query("UPDATE {uc_base} SET base=%d WHERE order_id=%d", $arg1['base_value'], $arg1['order_id']);
      return;
  }
}
?>

It doesn't act like it is getting to that point. I am not sure why? Any help would be great.

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: HOOK_ORDER_PANE 'edit-process'

I don't really have time to debug your test code, but I have to wonder... are you basing this off an existing order pane? It seems like if you had just copied/pasted the customer pane from uc_order_order_pane.inc as an example you wouldn't be having this trouble... Puzzled