Victortella Posted April 6, 2004 Share Posted April 6, 2004 Can anyone please help me? I have a problem with my orders not being recorded in the admin section. Which means even though an order is placed the orders are not being recorded so I have no way of knowing what was ordered. Victor Quote Link to comment Share on other sites More sharing options...
Guest Posted April 30, 2004 Share Posted April 30, 2004 We are also having this issue. FYI, there is a bug reported here: http://www.oscommerce.com/community/bugs,979 The other issue that we are having that is related to the order module can be found here: http://www.oscommerce.com/community/bugs,1...search,customer Does anyone know if these have been resolved? Thank you. Quote Link to comment Share on other sites More sharing options...
pbwebguy Posted May 3, 2004 Share Posted May 3, 2004 The problem is with the SQL that is used to generate the list. The SQL has an LEFT JOIN on the orders_totals table but part of the condition for the JOIN is stuck in the WHERE clause. This clause is causing the problem. Need to update the orders.php file and change the following SQL statements to move the WHERE clause into the LEFT JOIN clause. Change the SQL from: select count(*) as total from orders o left join orders_total ot on (o.orders_id = ot.orders_id), orders_status s where o.orders_status = s.orders_status_id and s.language_id = '1' and ot.class = 'ot_total' select o.orders_id, o.customers_name, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total from orders o left join orders_total ot on (o.orders_id = ot.orders_id), orders_status s where o.orders_status = s.orders_status_id and s.language_id = '1' and ot.class = 'ot_total' order by o.orders_id DESC limit 0, 20 To: select count(*) as total from orders o left join orders_total ot on (o.orders_id = ot.orders_id) and ot.class = 'ot_total', orders_status s where o.orders_status = s.orders_status_id and s.language_id = '1' select o.orders_id, o.customers_name, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total from orders o left join orders_total ot on (o.orders_id = ot.orders_id) and ot.class = 'ot_total' , orders_status s where o.orders_status = s.orders_status_id and s.language_id = '1' order by o.orders_id DESC limit 0, 20 Quote Link to comment Share on other sites More sharing options...
Guest Posted July 20, 2004 Share Posted July 20, 2004 I do a search and replace for this string in admin/orders.php and NONE of this code appears there.... And I still do not show any orders. Nor do I get any emails when an order is made. And Yes I have added additional email addresses. NONE of the stuff that I have downloaded helps either. I think I have just about read EVERYTHING on this forum about this issue and nothing seems to work. Any other ideas????? Quote Link to comment Share on other sites More sharing options...
John Doswell Posted July 20, 2004 Share Posted July 20, 2004 are you using paypall as payment methode ??? john Quote Link to comment Share on other sites More sharing options...
samuraibot Posted September 15, 2004 Share Posted September 15, 2004 Thanks pbwebguy, that fixes it straight away. It's between lines 353 - 368 in Admin/orders.php Make sure you delete the "," after the end of the left join inner braces ( & ) and then put a "," after adding (as pbwebguy said:) and ot.class = 'ot_total' Quote Link to comment Share on other sites More sharing options...
PosieMama Posted October 13, 2004 Share Posted October 13, 2004 Thanks pbwebguy, that fixes it straight away. It's between lines 353 - 368 in Admin/orders.php Make sure you delete the "," after the end of the left join inner braces ( & ) and then put a "," after adding (as pbwebguy said:) and ot.class = 'ot_total' <{POST_SNAPBACK}> samuraibot, What version is that from? I am using this(bear with me I am SO new at this)... orders.php,v 1.112 2003/06/29 I am pretty sure I am in the right place but I don't see any of the wrong code there. I am in admin/orders.php I am having this same problem and it is driving me nuts. Any further help is much appreciated! Thanks! Tiffany www.theposiepatch.com Quote Link to comment Share on other sites More sharing options...
241comp Posted October 21, 2004 Share Posted October 21, 2004 I am using the same version and the code is different. It just stoped working. Can some help us. Nick This is the code from 353 to 375 <?php if (isset($HTTP_GET_VARS['cID'])) { $cID = tep_db_prepare_input($HTTP_GET_VARS['cID']); $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"; } elseif (isset($HTTP_GET_VARS['status'])) { $status = tep_db_prepare_input($HTTP_GET_VARS['status']); $orders_query_raw = "select o.orders_id, o.customers_name, 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.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and s.orders_status_id = '" . (int)$status . "' and ot.class = 'ot_total' order by o.orders_id DESC"; } else { $orders_query_raw = "select o.orders_id, o.customers_name, 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.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and ot.class = 'ot_total' order by o.orders_id DESC"; } $orders_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_SEARCH_RESULTS, $orders_query_raw, $orders_query_numrows); $orders_query = tep_db_query($orders_query_raw); while ($orders = tep_db_fetch_array($orders_query)) { if ((!isset($HTTP_GET_VARS['oID']) || (isset($HTTP_GET_VARS['oID']) && ($HTTP_GET_VARS['oID'] == $orders['orders_id']))) && !isset($oInfo)) { $oInfo = new objectInfo($orders); } if (isset($oInfo) && is_object($oInfo) && ($orders['orders_id'] == $oInfo->orders_id)) { echo ' <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=edit') . '\'">' . "\n"; } else { echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID')) . 'oID=' . $orders['orders_id']) . '\'">' . "\n"; } ?> Quote Link to comment Share on other sites More sharing options...
patrick77550 Posted July 20, 2005 Share Posted July 20, 2005 Have you tried going to Admin>Modules>Order Total and either installing if not previously installed or selecting each component then choosing edit>update (no changes likely necessary)? Just fixed essentially the same problem for me. Quote Link to comment Share on other sites More sharing options...
vacation_dan Posted October 19, 2005 Share Posted October 19, 2005 This fix from Vger worked for me. This is a problem with MySQL 4.1 and osCommerce. In admin/includes/classes/split_page_results.php, around line 37 you'll see these two lines of code: $offset = ($max_rows_per_page * ($current_page_number - 1)); $sql_query .= " limit " . $offset . ", " . $max_rows_per_page; Sandwich these lines of code between the two lines above: if ($offset < 0) { $offset = 0 ; } That should resolve the problem. Vger http://www.oscommerce.com/forums/index.php?sho...26entry697026 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.