osCommerce Community Support Forums: Parse error - osCommerce Community Support Forums

Jump to content

Corporate Sponsor


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Parse error Rate Topic: -----

#1 User is offline   chycco Icon

  • Find Posts
  • Group: Community Member
  • Posts: 48
  • Joined: 13-September 02
  • Real Name:Luca Grani

Posted 25 July 2003 - 04:29 PM

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
0

#2 User is offline   Rumble Icon

  • Find Posts
  • Group: Community Member
  • Posts: 631
  • Joined: 04-February 03
  • Real Name:A Reddy

Posted 25 July 2003 - 04:42 PM

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!
0

#3 User is offline   chycco Icon

  • Find Posts
  • Group: Community Member
  • Posts: 48
  • Joined: 13-September 02
  • Real Name:Luca Grani

Posted 25 July 2003 - 05:35 PM

mmm....it's the same code I have :cry:

help.........
0

#4 User is offline   lloydrobbins Icon

  • Find Posts
  • Group: Community Member
  • Posts: 25
  • Joined: 27-April 03
  • Real Name:Lloyd Robbins

Posted 25 July 2003 - 06:08 PM

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.prestosof...ge=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."
0

#5 User is offline   chycco Icon

  • Find Posts
  • Group: Community Member
  • Posts: 48
  • Joined: 13-September 02
  • Real Name:Luca Grani

Posted 25 July 2003 - 06:31 PM

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
0

#6 User is offline   lloydrobbins Icon

  • Find Posts
  • Group: Community Member
  • Posts: 25
  • Joined: 27-April 03
  • Real Name:Lloyd Robbins

Posted 25 July 2003 - 06:39 PM

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."
0

#7 User is offline   chycco Icon

  • Find Posts
  • Group: Community Member
  • Posts: 48
  • Joined: 13-September 02
  • Real Name:Luca Grani

Posted 25 July 2003 - 09:52 PM

yeah!!
I have changed these line and now i have my target!!!
thank you very much! It works perfectly as i want! :)
0

#8 User is offline   lloydrobbins Icon

  • Find Posts
  • Group: Community Member
  • Posts: 25
  • Joined: 27-April 03
  • Real Name:Lloyd Robbins

Posted 25 July 2003 - 11:49 PM

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."
0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic