Results 1 to 10 of 12

Hybrid View

  1. #1
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,942
    Plugin Contributions
    96

    Default Re: Unwanted characters showing up in Comments section of Admin - Orders

    Right, I misspoke regarding the extra backslashes in the data. What you should be seeing in the comments field is:
    Code:
    Joe,
    
    Have received your payment, thank you. The TEST ITEM will be shipping out tomorrow. The tracking number is sdfgskldfjsdlkfjsdlkfjsd654684.
    
    Look forward to doing more business.
    
    Thanks, Ted
    where those \r\n sequences were converted to their CRLF equivalents.

    I'm pretty sure that it's the edit_orders processing, as the built-in orders.php handling performs the database insert "directly" (i.e. using the $db->Execute function) while edit_orders uses the zen_db_perform function.

    You might try editing your copy of edit_orders.php, changing this block:
    Code:
          $sql_data_array = array(
            'orders_id' => (int)$oID,
            'orders_status_id' => zen_db_input($status),
            'date_added' => 'now()',
            'customer_notified' => zen_db_input($customer_notified),
            'comments' => zen_db_input($comments),
          );
          // BEGIN TY TRACKER 3 - INCLUDE DATABASE FIELDS IN STATUS UPDATE
          foreach($track_id as $id => $track) {
            $sql_data_array['track_id' . $id] = zen_db_input($track);
          }
          unset($id); unset($track);
          // END TY TRACKER 3 - INCLUDE DATABASE FIELDS IN STATUS UPDATE
          zen_db_perform(TABLE_ORDERS_STATUS_HISTORY, $sql_data_array);
    removing the calls to zen_db_input, as follows:
    Code:
          $sql_data_array = array(
            'orders_id' => (int)$oID,
            'orders_status_id' => $status,
            'date_added' => 'now()',
            'customer_notified' => $customer_notified,
            'comments' => $comments,
          );
          // BEGIN TY TRACKER 3 - INCLUDE DATABASE FIELDS IN STATUS UPDATE
          foreach($track_id as $id => $track) {
            $sql_data_array['track_id' . $id] = $track;
          }
          unset($id); unset($track);
          // END TY TRACKER 3 - INCLUDE DATABASE FIELDS IN STATUS UPDATE
          zen_db_perform(TABLE_ORDERS_STATUS_HISTORY, $sql_data_array);

  2. #2
    Join Date
    Nov 2015
    Location
    New Jersey USA
    Posts
    76
    Plugin Contributions
    0

    Default Re: Unwanted characters showing up in Comments section of Admin - Orders

    Changing the code in ADMIN/edit_orders.php as suggested has solved the problem.

    Just made a donation to the Zen Cart team in appreciation for all the help I have gotten on the forum for several issues from lat9, MC12345678, kobra, Dr. Byte, picaflor-azul, and others.

    Thanks and please keep up the good work.

  3. #3
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,532
    Plugin Contributions
    127

    Default Re: Unwanted characters showing up in Comments section of Admin - Orders

    It seems as though after applying this fix, multiline comments now contain embedded HTML break characters:

    **Test remark 1<br />Test remark 2<br />Test remark 3
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

 

 

Similar Threads

  1. v139h Scandinavian characters not showing in order comments in admin
    By Dexter71 in forum General Questions
    Replies: 0
    Last Post: 7 May 2014, 02:17 PM
  2. v151 Orders placed on new ZC Store Coming up on OSC Max Admin Orders Section
    By acrenshaw in forum Managing Customers and Orders
    Replies: 1
    Last Post: 18 Jan 2013, 02:08 AM
  3. Orders are showing only in English section
    By Franck69 in forum Managing Customers and Orders
    Replies: 2
    Last Post: 14 Jul 2008, 05:02 PM
  4. Customer Comments section missing from my admin?
    By McGill in forum General Questions
    Replies: 2
    Last Post: 20 May 2008, 04:42 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg