I woke up and smelled some roses. The problem was the value had a charactor attached to it (ie 148.0f). By making a small change in includes/classes/order.php I fixed the second error (I hope I didn't make myself a new one). I add the builtin function 'floatval' to the element 'value' of the sql array for the table orders total insert. In other words, (okay you can kick me later drbyte for messing with your code) I changed
PHP Code:
for ($i=0, $n=sizeof($zf_ot_modules); $i<$n; $i++) {
$sql_data_array = array('orders_id' => $insert_id,
'title' => $zf_ot_modules[$i]['title'],
'text' => $zf_ot_modules[$i]['text'],
'value' =>$zf_ot_modules[$i]['value'],
'class' => $zf_ot_modules[$i]['code'],
'sort_order' => $zf_ot_modules[$i]['sort_order']);
zen_db_perform(TABLE_ORDERS_TOTAL, $sql_data_array);
}
to
PHP Code:
for ($i=0, $n=sizeof($zf_ot_modules); $i<$n; $i++) {
$sql_data_array = array('orders_id' => $insert_id,
'title' => $zf_ot_modules[$i]['title'],
'text' => $zf_ot_modules[$i]['text'],
'value' => floatval($zf_ot_modules[$i]['value']),
'class' => $zf_ot_modules[$i]['code'],
'sort_order' => $zf_ot_modules[$i]['sort_order']);
zen_db_perform(TABLE_ORDERS_TOTAL, $sql_data_array);
}
everything seems to work as expected during checkout.
Bookmarks