DeeJay86 Posted April 15, 2010 Share Posted April 15, 2010 I have the module installed, had been for a long time but after the new php version everything seems to be bongus, finally i get most errors made up but this edit_orders 5.0.9b addon still has a error that i cannot seem to get fixed. The error is: Warning: number_format() expects parameter 1 to be double, string given in /customers/*******/*******/httpd.www/admin/edit_orders.php on line 1740 And it appears as soonest i get into the edit_orders.php through pressing the "Edit Oder" button on an existing order. Thanks in advance! Amyamoxylkr 1 Quote Link to comment Share on other sites More sharing options...
DeeJay86 Posted April 16, 2010 Author Share Posted April 16, 2010 Not anyone who can help me out with this issue? Quote Link to comment Share on other sites More sharing options...
♥mdtaylorlrim Posted April 16, 2010 Share Posted April 16, 2010 Not anyone who can help me out with this issue? Not without seeing lines 1730-1750 of the edit_orders.php file. Quote Community Bootstrap Edition, Edge Avoid the most asked question. See How to Secure My Site and How do I...? Link to comment Share on other sites More sharing options...
Mr_EsS Posted October 12, 2010 Share Posted October 12, 2010 Not without seeing lines 1730-1750 of the edit_orders.php file. Hi! I know that this is a old tread but i have the same problem. ' <td align="right" class="dataTableContent"><input name="update_totals['.$i.'][value]" id="'.$id.'[value]" value="' . number_format($order->totals[$i]['value'], 2, '.', '') . '" size="6"><input name="update_totals['.$i.'][class]" type="hidden" value="' . $order->totals[$i]['class'] . '"><input name="update_totals['.$i.'][id]" type="hidden" value="' . $shipping_module_id . '" id="' . $id . '[id]"></td>' . "\n"; Quote Link to comment Share on other sites More sharing options...
Luyso Posted November 28, 2010 Share Posted November 28, 2010 I have the same problem too. I use the 2.3.1 version. Does anybody knows anything? Thanks¡¡ Quote Link to comment Share on other sites More sharing options...
AlexandrZuyev Posted December 1, 2010 Share Posted December 1, 2010 Same problem because I have AJAX-AttributeManager-V2.8.9 installed. They have been conflicting with each other cause same ID. Maybe someone have got a sollution? Thanx Quote Link to comment Share on other sites More sharing options...
NigelW Posted January 21, 2011 Share Posted January 21, 2011 (edited) Have had the same problem today, After a bit of searching I found a solution, basically the fix is to add (double) just after number_format( <td align="right" class="dataTableContent"> <input name="update_totals['.$i.'][value]" id="'.$id.'[value]" value="' . number_format((double)$order->totals[$i]['value'], 2, '.', '') . '" size="6"> Being reasonably new to php & mysql I really don't understand why this works - maybe someone can explain :unsure: Edited January 21, 2011 by ReDYeViL Quote Link to comment Share on other sites More sharing options...
reflex-ocasion Posted October 3, 2012 Share Posted October 3, 2012 I reopen the thread because I have the same problem now. It worked fine until I changed hosting. I searched and the only solution that works for me is to add @ before number_format($order->totals[$i]['value'], 2, '.', '') But not to be stuck, has this separately, It must be well @ number_format($order->totals[$i]['value'], 2, '.', '') This is the full line edit_orders.php and edit_orders_ajax.php <td align="right" class="dataTableContent"><input name="update_totals['.$i.'][value]" id="'.$id.'[value]" value="' . @ number_format($order->totals[$i]['value'], 2, '.', '') . '" size="6" onChange="obtainTotals()"><input name="update_totals['.$i.'][class]" type="hidden" value="' . $order->totals[$i]['class'] . '"><input name="update_totals['.$i.'][id]" type="hidden" value="' . $shipping_module_id . '" id="' . $id . '[id]"></td>' . "\n"; Quote Link to comment Share on other sites More sharing options...
MrPhil Posted November 11, 2013 Share Posted November 11, 2013 Adding @ is never a good idea. All it does is suppress error messages. It would be better to figure out what went wrong in the first place and fix it once and for all. Did your change of hosting involve an upgrade in PHP version? From what to what? Most likely, the first parameter to the call ("string") has something bogus in it, such as , or . group separators, or a $ sign, or something mixed in with the numeric value expected. It would be good to print out the $order->totals[$i]['value'] amount and see what it has besides a number. PHP ought to be able to convert a number as a string, or an integer value, to a real (double) value. If it can't, that sounds like a PHP bug. Quote Link to comment Share on other sites More sharing options...
♥joli1811 Posted November 11, 2013 Share Posted November 11, 2013 Todays record for dragging up the oldest post is awarded to @@MrPhil :D :D no comment :thumbsup: Quote To improve is to change; to be perfect is to change often. Link to comment Share on other sites More sharing options...
MrPhil Posted November 12, 2013 Share Posted November 12, 2013 In my defense, they were advocating something hazardous that I felt should be corrected. If I had noticed this post a year ago, I would have commented then. Quote Link to comment Share on other sites More sharing options...
quetevendo Posted December 24, 2014 Share Posted December 24, 2014 (edited) Have had the same problem today, After a bit of searching I found a solution, basically the fix is to add (double) just after number_format( <td align="right" class="dataTableContent"> <input name="update_totals['.$i.'][value]" id="'.$id.'[value]" value="' . number_format((double)$order->totals[$i]['value'], 2, '.', '') . '" size="6"> Being reasonably new to php & mysql I really don't understand why this works - maybe someone can explain it is the solution! <td align="right" class="dataTableContent"><input name="update_totals['.$i.'][value]" id="'.$id.'[value]" value="' . number_format($order->totals[$i]['value'], 2, '.', '') . '" size="6"><input name="update_totals['.$i.'][class]" type="hidden" value="' . $order->totals[$i]['class'] . '"><input name="update_totals['.$i.'][id]" type="hidden" value="' . $shipping_module_id . '" id="' . $id . '[id]"></td>' . "\n"; Replace With: <td align="right" class="dataTableContent"><input name="update_totals['.$i.'][value]" id="'.$id.'[value]" value="' . number_format((double)$order->totals[$i]['value'], 2, '.', '') . '" size="6"><input name="update_totals['.$i.'][class]" type="hidden" value="' . $order->totals[$i]['class'] . '"><input name="update_totals['.$i.'][id]" type="hidden" value="' . $shipping_module_id . '" id="' . $id . '[id]"></td>' . "\n"; Edited December 24, 2014 by quetevendo Quote Link to comment Share on other sites More sharing options...
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.