Jump to content

Issue Information

  • #000676

  • 0 - None Assigned

  • Won't Fix


  • -

Issue Confirmations

  • Yes (0)No (2)

should $order->info['total'] be float or string? order.php

Posted by fohenrolle on 28 March 2014 - 16:02

I am using oscommerce for quite a long time now and like it very much.
Recently I have started to look a little closer at the code and noticed this:

In the file includes/classes/order.php the variable $order->info['total'] is defined:
'total' => strip_tags($order_total['text'])

It is used quite frequently, but in most places the code seems to expect a float value and not a string.
Therefore I would propose to change the code in line 44
$order_total_query = tep_db_query("select text from " . TABLE_ORDERS_TOTAL .....
$order_total_query = tep_db_query("select value from " . TABLE_ORDERS_TOTAL .....


Oh, I have misunderstood something here!
The definition in line 44 is only used for the customers shopping profile (account_history_info.php). There the code will be very happy to receive a string.
So this bug can be closed.
Sorry for the confusion!

changed status to: Won't Fix