sialivi Posted June 4, 2007 Share Posted June 4, 2007 One of the payment methods cause an error during checkout_process.php 1366 - Incorrect decimal value: '' for column 'value' at row 1 insert into orders_total (orders_id, title, text, value, class, sort_order) values ('5988', 'Postförskott:', 'SEK.50,00', '', 'ot_postforskott', '23') Is it normal for 'value' to be blank at this stage? Is that column updated later? Any ideas about what might be wrong? Thanks Link to comment Share on other sites More sharing options...
Nullachtfuffzehn Posted June 4, 2007 Share Posted June 4, 2007 SEK.50,00 This causes your error. This ain't a valid value for a price. Link to comment Share on other sites More sharing options...
sialivi Posted June 4, 2007 Author Share Posted June 4, 2007 SEK.50,00 is for the text column, the value column is blank Link to comment Share on other sites More sharing options...
Guest Posted June 5, 2007 Share Posted June 5, 2007 That means one of the $order_totals[$i]['value'] is empty. Have you checked the orders total modules installed? (the process member function of each) Link to comment Share on other sites More sharing options...
sialivi Posted June 5, 2007 Author Share Posted June 5, 2007 Looks like value is being set in the process function: // display the output price in the total $this->output[] = array('title' => $this->title . ':', 'text' => $currencies->format($order->info['postforskott']+$p_cost, true, $order->info['currency'], $order->info['currency_value']), 'value' => $order->info['postforskott']); Link to comment Share on other sites More sharing options...
Guest Posted June 5, 2007 Share Posted June 5, 2007 It's possible for $order->info['postforskott'] element to be blank. Have you checked it's contents? Is it set in the orders class? You may have to check the order class file Link to comment Share on other sites More sharing options...
sialivi Posted June 6, 2007 Author Share Posted June 6, 2007 This is a bit weird. If I'm reading this correctly, the value is actually supposed to be null at this stage, the value is then updated in the after_process function. And it all worked fine on the old server. Could there be some difference in settings between the old and the new server? Either PHP settings or MySQL settings? Something that seems to apply in this particular case where the above sql statement used to work but doesn't anymore? Link to comment Share on other sites More sharing options...
sialivi Posted June 6, 2007 Author Share Posted June 6, 2007 The old server used PHP 4 and MySQL 4 The new server use PHP 5 and MySQL 5 Any settings that might be stricter by default than they were in the past? Link to comment Share on other sites More sharing options...
sialivi Posted June 6, 2007 Author Share Posted June 6, 2007 On line 68 in database.php there's a switch statement that does the following test: case 'null': But what if the $value actually is NULL, shouldn't that be handled as well? Link to comment Share on other sites More sharing options...
sialivi Posted June 6, 2007 Author Share Posted June 6, 2007 It's possible for $order->info['postforskott'] element to be blank. Have you checked it's contents? Is it set in the orders class? You may have to check the order class file It is indeed blank, well, NULL. This is the var_dump from checkout_process.php array(6) { ["orders_id"]=> int(6025) ["title"]=> string(13) "Postförskott:" ["text"]=> string(9) "SEK.50,00" ["value"]=> NULL ["class"]=> string(15) "ot_postforskott" ["sort_order"]=> string(2) "23" } The postforskott.php then updates the value to 50 in it's after_process() function. I don't understand how this has worked on the old server, but it did. I'm really stuck at this point, don't know how to proceed. Link to comment Share on other sites More sharing options...
Guest Posted June 6, 2007 Share Posted June 6, 2007 post your catalog\includes\classes\order.php Link to comment Share on other sites More sharing options...
sialivi Posted June 8, 2007 Author Share Posted June 8, 2007 Link to comment Share on other sites More sharing options...
sialivi Posted June 11, 2007 Author Share Posted June 11, 2007 Problem solved. Downgraded MySQL from 5 to 4 and now everything works fine. Link to comment Share on other sites More sharing options...
Nullachtfuffzehn Posted June 11, 2007 Share Posted June 11, 2007 What a wise man said: "Never change a running system".... Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.