pielie Posted May 6, 2006 Posted May 6, 2006 Hello, I'm trying to round the totals from checkout_confirmation.php the total must be rounded. i thought maybe this would work checkout_process.php : $sql_data_array = array('orders_id' => $insert_id, 'title' => $order_totals[$i]['title'], 'text' => round((ceil($order_totals[$i]['text']/5)*5),2), 'value' => $order_totals[$i]['value'], 'class' => $order_totals[$i]['code'], 'sort_order' => $order_totals[$i]['sort_order']); tep_db_perform(TABLE_ORDERS_TOTAL, $sql_data_array); } this will not word he put not the total in de Db. And i cant figure out how this works. I'm not good in Oscommerce so... Can anyone help me to round the total en put him in my Database and display him at my checkout_confirmation.php. Thanks a lot Quote
pielie Posted May 6, 2006 Author Posted May 6, 2006 I found it for everybody who likes to know this is the solution: Change this in includes/modules/order_total/ot_total.php: function process() { global $order, $currencies; $this->output[] = array('title' => $this->title . ':', 'text' => '<b>' . $currencies->format($order->info['total'], true, $order->info['currency'], $order->info['currency_value']) . '</b>', 'value' => $order->info['total']); } By this: function process() { global $order, $currencies; $this->output[] = array('title' => $this->title . ':', 'text' => '<b>' . $currencies->format((ceil($order->info['total']/5)*5), true, $order->info['currency'], $order->info['currency_value']) . '</b>', 'value' => $order->info['total']); } Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.