Jump to content



Issue Information

  • #000676

  • 0 - None Assigned

  • Won't Fix

  • 2.3.3.4

  • -

Issue Confirmations

  • Yes (0)No (2)
Photo

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

Posted by fohenrolle on 28 March 2014 - 16:02

Hi,
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
from:
$order_total_query = tep_db_query("select text from " . TABLE_ORDERS_TOTAL .....
to:
$order_total_query = tep_db_query("select value from " . TABLE_ORDERS_TOTAL .....

Bests,
Leon

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