$HTTP_POST_VARS

Hello everyone,
Can somebody please advise on a solution to this, I am modding a checkout module that worked ok for PHP 4 but now in PHP 5 some info is not captured /retained. here’s the chunk of code

[php]function confirmation() {
$confirmation = array(‘fields’ => array(array(‘title’ => MODULE_PAYMENT_PINGIT_CUSTOMER_MOBILE,
‘field’ => tep_draw_input_field(‘mobile_owner’)),
array(‘title’ => MODULE_PAYMENT_PINGIT_TEXT_DESCRIPTION)));

  return $confirmation;
}

function process_button() {
  return false;
}

function before_process() {
  return false;
}

function after_process() {
  global $HTTP_POST_VARS, $order, $insert_id;

  $sql_data_array = array('orders_id' => (int)$insert_id,
                          'orders_status_id' => (int)$order->info['order_status'],
                          'date_added' => 'now()',
                          'customer_notified' => '0',
                          'comments' => MODULE_PAYMENT_PINGIT_CUSTOMER_MOBILE . ' ' . $HTTP_POST_VARS['mobile_owner']);

  tep_db_perform(TABLE_ORDERS_STATUS_HISTORY, $sql_data_array);
}

[/php]

mobile_owner is the customers mobile number entered during checkout and is supposed to be added into the comments for the order, the defined text MODULE_PAYMENT_PINGIT_CUSTOMER_MOBILE is added correctly but mobile_owner is empty.

I really need this info

many thanks

Change to $_POST[‘mobile_owner’]

Hi thanks,

I’ve tried [php]‘comments’ => MODULE_PAYMENT_PINGIT_CUSTOMER_MOBILE . ’ ’ . $_POST[‘mobile_owner’]);[/php]

but not working

A little more info as I find it,

After choosing Barclays pingit checkout module this runs and works correctly:

[php]

<?php echo $confirmation['title']; ?>

<?php
for ($i=0, $n=sizeof($confirmation[‘fields’]); $i<$n; $i++) {
?>

<?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?>
<?php echo $confirmation['fields'][$i]['title']; ?>
<?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?>
<?php echo $confirmation['fields'][$i]['field']; ?>

<?php
}
?>[/php]

This line draws an input field correctly:
[php]

<?php echo $confirmation['fields'][$i]['field']; ?>[/php]

the number entered into that field is supposed to be added to the array :

[php]function confirmation() {
$confirmation = array(‘fields’ => array(array(‘title’ => MODULE_PAYMENT_PINGIT_CUSTOMER_MOBILE,
‘field’ => tep_draw_input_field(‘mobile_owner’)),
array(‘title’ => MODULE_PAYMENT_PINGIT_TEXT_DESCRIPTION)));

  return $confirmation;
}[/php]

I seem to have a ‘chicken and egg’ situation that’s driving me nuts but this worked ok onan older version of oscommerce

Sponsor our Newsletter | Privacy Policy | Terms of Service