chycco Posted July 25, 2003 Posted July 25, 2003 Hi When I try to see my orders, suddendly I have this error: Parse error: parse error in /home/italiang/public_html/omysite/admin/orders.php on line 68 where line 68 is: case 'deleteconfirm': Anybody could tell me what's on earth is going on? :) thanx in advance chycco
Rumble Posted July 25, 2003 Posted July 25, 2003 Hi, Its not always the exact line thats the problem. Make sure the rmaining lines after that looks like; case 'deleteconfirm': $oID = tep_db_prepare_input($HTTP_GET_VARS['oID']); tep_remove_order($oID, $HTTP_POST_VARS['restock']); tep_redirect(tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID', 'action')))); break; } good luck Reddy to Rumble Thank you osCommerce and all who Contribute to her!
chycco Posted July 25, 2003 Author Posted July 25, 2003 mmm....it's the same code I have :cry: help.........
lloydrobbins Posted July 25, 2003 Posted July 25, 2003 Check the lines immediatly preceeding it. Extract the original version from the zip file your downloaded (You did keep it, didn't you? :D ) and compare the two files. Examdiff works well for this. http://www.prestosoft.com/ps.asp?page=edp_examdiff You've changed the code somehow, and now the PHP preprocessor can't work with it. -- Lloyd "Managing programmers is like herding cats."
chycco Posted July 25, 2003 Author Posted July 25, 2003 yess.... i have change the file with the original orders.phpand now it works. I had modify some lines to have the number order in the subject line of the customer (and admin) email.... but i don't understand...it worked...and suddendly it didn't work... really thanx to you
lloydrobbins Posted July 25, 2003 Posted July 25, 2003 You're welcome. I've found that parse errors are usually a result of either leaving off a semi-colon or missing a bracket. Here's the code from my admin orders.php. I get emails with the subject of "Hitches-Online.Com Order #1234". Is that what you are looking for? case 'update_order': $oID = tep_db_prepare_input($HTTP_GET_VARS['oID']); $status = tep_db_prepare_input($HTTP_POST_VARS['status']); $comments = tep_db_prepare_input($HTTP_POST_VARS['comments']); $order_updated = false; $check_status_query = tep_db_query("select customers_name, customers_email_address, orders_status, date_purchased from " . TABLE_ORDERS . " where orders_id = '" . tep_db_input($oID) . "'"); $check_status = tep_db_fetch_array($check_status_query); if ($check_status['orders_status'] != $status || $comments != '') { tep_db_query("update " . TABLE_ORDERS . " set orders_status = '" . tep_db_input($status) . "', last_modified = now() where orders_id = '" . tep_db_input($oID) . "'"); $customer_notified = '0'; if ($HTTP_POST_VARS['notify'] == 'on') { $notify_comments = ''; if ($HTTP_POST_VARS['notify_comments'] == 'on') { $notify_comments = sprintf(EMAIL_TEXT_COMMENTS_UPDATE, $comments) . "nn"; } $email = STORE_NAME . "n" . EMAIL_SEPARATOR . "n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID . "n" . EMAIL_TEXT_INVOICE_URL . ' ' . tep_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $oID, 'SSL') . "n" . EMAIL_TEXT_DATE_ORDERED . ' ' . tep_date_long($check_status['date_purchased']) . "nn" . $notify_comments . sprintf(EMAIL_TEXT_STATUS_UPDATE, $orders_status_array[$status]); tep_mail($check_status['customers_name'], $check_status['customers_email_address'], EMAIL_TEXT_SUBJECT, nl2br($email), STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); $customer_notified = '1'; } tep_db_query("insert into " . TABLE_ORDERS_STATUS_HISTORY . " (orders_id, orders_status_id, date_added, customer_notified, comments) values ('" . tep_db_input($oID) . "', '" . tep_db_input($status) . "', now(), '" . $customer_notified . "', '" . tep_db_input($comments) . "')"); $order_updated = true; } if ($order_updated) { $messageStack->add_session(SUCCESS_ORDER_UPDATED, 'success'); } else { $messageStack->add_session(WARNING_ORDER_NOT_UPDATED, 'warning'); } tep_redirect(tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('action')) . 'action=edit')); break; case 'deleteconfirm': -- Lloyd "Managing programmers is like herding cats."
chycco Posted July 25, 2003 Author Posted July 25, 2003 yeah!! I have changed these line and now i have my target!!! thank you very much! It works perfectly as i want! :)
lloydrobbins Posted July 25, 2003 Posted July 25, 2003 Glad I could help! Stop by our store if you need a hitch or auto accessories :D www.hitches-online.com -- Lloyd "Managing programmers is like herding cats."
Recommended Posts
Archived
This topic is now archived and is closed to further replies.