t0mc4t Posted October 29, 2002 Share Posted October 29, 2002 Hello there... I have install the TEP PR2.1 and it seems that it have problem on Order Total in Administration pages. So, if I click the order link then the data of customers orders are listed successfully. But all of the order total are show "0". I mean, it not counting the order total of the customer, and it show "0". Does anyone have any idea what make this happend? Btw, what is the different between TEP PR2.1 and OSC 2.2? Thanks... Link to comment Share on other sites More sharing options...
Mazzel Posted May 18, 2004 Share Posted May 18, 2004 I just fixed this in my own store, following another thread that i found. See if it is the same bug by checking if you DO see orders when searching for it with an ordernumber... my guess is that there is nothing wrong with the database as written above... In orders.php around line 356 you find: $orders_query_raw = "select o.orders_id, o.customers_name, o.customers_id, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id), " . TABLE_ORDERS_STATUS . " s where o.customers_id = '" . (int)$cID . "' and o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and ot.class = 'ot_total' order by orders_id DESC"; apparently the bold peace of the statement is stuck in the "left join" statement, and you should move it to read: $orders_query_raw = "select o.orders_id, o.customers_name, o.customers_id, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id)and ot.class = 'ot_total', " . TABLE_ORDERS_STATUS . " s where o.customers_id = '" . (int)$cID . "' and o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' order by orders_id DESC"; Also in the two following statements (line 359 and 361) you should change the same thing... I followed this solutions and it works fine for me... All Credit goes to the author of the thread I took this fix from...(can't find it right now...sorry!) Good Luck! Link to comment Share on other sites More sharing options...
nrlatsha Posted May 18, 2004 Share Posted May 18, 2004 Hats off to Mazzel, a newbie with a keen grasp on the search function! Kudos to you my good man, kudos! 9 times out of 10 its a PEBCAK Error (Problem exists between chair and keyboard) Replace that and you're fine... Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.