Reviewed & tested by the community
Project:
e-Commerce
Version:
5.x-3.4
Component:
store
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 Apr 2008 at 22:22 UTC
Updated:
17 Jun 2008 at 12:59 UTC
The "Transaction Summary" email that gets sent to the site admin contains sections to display Shipping and Billing addresses, however the address variables that populate those sections don't actually contain any data.
The code is located in /ecommerce/store/store.module
Line 132 $shipping_to = store_format_address($data, 'shipping', 'text');
Line 133 $billing_to = store_format_address($data, 'billing', 'text');
The reason for this appears to be that there is no mention of an SQL query to pull in data from the {ec_transaction_address} table within the entire store_cron() function.
My temporary fix was to swipe the following code from the store_transaction_load() function, modify variable names, and place it above the two lines mentioned above:
// Load Addressess
$addr_result = db_query('SELECT sta.* FROM {ec_transaction_address} sta WHERE sta.txnid = %d', $data->txnid);
while ($misc = db_fetch_object($addr_result)) {
$data->address[$misc->type] = $misc;
}
If there's a better fix for this, please let us know.
Comments
Comment #1
buddaI too just noticed this bug.
Your fix worked a treat. It could probably be done neater with a table join. But then a lot of the ecommerce system could probably be done neater in the long run!
This is a suitable short term fix for me - and probably others who have noticed this error in ecommerce 3.4