Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    Mar 2010
    Location
    Nottingham UK
    Posts
    87
    Plugin Contributions
    1

    Default Customers Comments Don't Show In Admin orders.php

    Hi all,

    I've upgraded from v1.5.1 to v1.5.5a and noticed that customers comments don't appear in the orders overview side pane in admin/orders.php. It shows the yellow link to say comments exist and also mentions the word 'comments' under the shipping method in the right hand pane... but no actual comment is showing.


    Name:  comments.jpg
Views: 320
Size:  61.0 KB


    Is this the correct behaviour?

    Thanks.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Customers Comments Don't Show In Admin orders.php

    Quote Originally Posted by bottyz View Post
    Is this the correct behaviour?
    Assuming there actually IS a comment, no, this is not the correct behaviour.

    So the real question is: Is there actually a comment? Or is the yellow dot appearing when it shouldn't?
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Mar 2010
    Location
    Nottingham UK
    Posts
    87
    Plugin Contributions
    1

    Default Re: Customers Comments Don't Show In Admin orders.php

    Quote Originally Posted by DrByte View Post
    Assuming there actually IS a comment, no, this is not the correct behaviour.

    So the real question is: Is there actually a comment? Or is the yellow dot appearing when it shouldn't?
    Hi DrByte,

    It is a comment yes, as you can see from the screenshot the yellow box doesn't display when there is no comment. The one in the screenshot was a test order I put through myself, but its happened on live orders also. When you open the commented order in its detailed view, the comment is listed ok, its just not listed in the right pane on the orders.php overview.

    I've compared the orders.php file with a vanilla one from the v155a downloads section and both are identical.



    Any ideas where this may also be affected?

  4. #4
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,401
    Plugin Contributions
    87

    Default Re: Customers Comments Don't Show In Admin orders.php

    An observation: The behavior of the Customers->Orders sidebox's display of those comments hasn't changed from v1.5.4. That version, too, displays the Comments "heading" but not the comment's text itself.

    I'm not sure when that heading was introduced, it's not present in 1.3.9h.

  5. #5
    Join Date
    Mar 2010
    Location
    Nottingham UK
    Posts
    87
    Plugin Contributions
    1

    Default Re: Customers Comments Don't Show In Admin orders.php

    Quote Originally Posted by lat9 View Post
    An observation: The behavior of the Customers->Orders sidebox's display of those comments hasn't changed from v1.5.4. That version, too, displays the Comments "heading" but not the comment's text itself.

    I'm not sure when that heading was introduced, it's not present in 1.3.9h.
    Hi lat9,

    So in that case is this actually the expected behaviour? Dr Byte didn't seem to think so.
    Is there a way to have it show the customer comments? I think it may be beneficial to have it readily available at a quick glance. I'll poke around the code myself to see if I can find a simple implementation.

  6. #6
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,401
    Plugin Contributions
    87

    Default Re: Customers Comments Don't Show In Admin orders.php

    You can see the customer's comments when you view the details of the order.

    P.S. I didn't say it was "expected behavior", just that the behavior hasn't changed since v1.5.4.
    Last edited by lat9; 30 Jun 2016 at 01:09 PM. Reason: Added P.S.

  7. #7
    Join Date
    Mar 2010
    Location
    Nottingham UK
    Posts
    87
    Plugin Contributions
    1

    Default Re: Customers Comments Don't Show In Admin orders.php

    Quote Originally Posted by lat9 View Post
    You can see the customer's comments when you view the details of the order.

    P.S. I didn't say it was "expected behavior", just that the behavior hasn't changed since v1.5.4.
    I know you can, but I thought it might be beneficial to have the comment printed in the side box also, so that its available at a glance before opening each order.

    I'm currently trying to figure out how to safely extract the actual comment around line 993 of the orders.php:

    Code:
     // indicate if comments exist
            $orders_history_query = $db->Execute("select orders_status_id, date_added, customer_notified, comments from " . TABLE_ORDERS_STATUS_HISTORY . " where orders_id = '" . $oInfo->orders_id . "' and comments !='" . "'" );
    
            if ($orders_history_query->RecordCount() > 0) {
              $contents[] = array('align' => 'left', 'text' => '<br />' . TABLE_HEADING_COMMENTS);
            }
    I've got the comment to display by using the below, but do I need to sanitize the output in some way?

    Code:
            // indicate if comments exist
            $orders_history_query = $db->Execute("select orders_status_id, date_added, customer_notified, comments from " . TABLE_ORDERS_STATUS_HISTORY . " where orders_id = '" . $oInfo->orders_id . "' and comments !='" . "'" );
    
    	if ($orders_history_query->RecordCount() > 0) {
                $contents[] = array('align' => 'left', 'text' => '<br />' . TABLE_HEADING_COMMENTS) . ":";
                $contents[] = array('align' => 'left', 'text' => $orders_history_query->fields['comments']);
    
            }
    Last edited by bottyz; 30 Jun 2016 at 01:36 PM. Reason: cleaning the code layout

  8. #8
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Customers Comments Don't Show In Admin orders.php

    At first glance that looks like it'll probably work.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  9. #9
    Join Date
    Jan 2014
    Location
    Arizona
    Posts
    107
    Plugin Contributions
    1

    Default Re: Customers Comments Don't Show In Admin orders.php

    Code:
            // indicate if comments exist
            $orders_history_query = $db->Execute("select orders_status_id, date_added, customer_notified, comments from " . TABLE_ORDERS_STATUS_HISTORY . " where orders_id = '" . $oInfo->orders_id . "' and comments !='" . "'" );
    
    	if ($orders_history_query->RecordCount() > 0) {
                $contents[] = array('align' => 'left', 'text' => '<br />' . TABLE_HEADING_COMMENTS) . ":";
                $contents[] = array('align' => 'left', 'text' => $orders_history_query->fields['comments']);
    
            }
    Has there been any follow up on this? I've been trying to find a fix, and while the above code works, I only want it to display the Customer's comment, not the transaction report from the credit card processing. More the same as the packing slip only shows the first comment and only if the customer left a comment, otherwise it says "--none--"

  10. #10
    Join Date
    Jan 2017
    Location
    USA
    Posts
    6
    Plugin Contributions
    0

    Default Re: Customers Comments Don't Show In Admin orders.php

    Quote Originally Posted by bottyz View Post

    I've got the comment to display by using the below, but do I need to sanitize the output in some way?

    Code:
            // indicate if comments exist
            $orders_history_query = $db->Execute("select orders_status_id, date_added, customer_notified, comments from " . TABLE_ORDERS_STATUS_HISTORY . " where orders_id = '" . $oInfo->orders_id . "' and comments !='" . "'" );
    
    	if ($orders_history_query->RecordCount() > 0) {
                $contents[] = array('align' => 'left', 'text' => '<br />' . TABLE_HEADING_COMMENTS) . ":";
                $contents[] = array('align' => 'left', 'text' => $orders_history_query->fields['comments']);
            }

    There is a small error in your code. At the end of the previous line, where you added a colon to be displayed after TABLE_HEADING_COMMENTS, that colon should be inside of the right parenthesis. Other than that, it works great! :-)

    Here is a corrected version of the code...

    Code:
            // indicate if comments exist
            $orders_history_query = $db->Execute("select orders_status_id, date_added, customer_notified, comments from " . TABLE_ORDERS_STATUS_HISTORY . " where orders_id = '" . $oInfo->orders_id . "' and comments !='" . "'" );
    
    	if ($orders_history_query->RecordCount() > 0) {
                $contents[] = array('align' => 'left', 'text' => '<br />' . TABLE_HEADING_COMMENTS . ":");
                $contents[] = array('align' => 'left', 'text' => $orders_history_query->fields['comments']);
            }
    When things like this are found in the code, is there an official way to notify the development team so that it can be fixed for future releases of Zen Cart?


    Doug

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Addin Repeat Customers in Admin -> Customers -> Orders.php
    By fabburl in forum Managing Customers and Orders
    Replies: 3
    Last Post: 25 Feb 2014, 05:05 AM
  2. Google checkout orders don't show up in admin panel.
    By mohinder in forum Addon Payment Modules
    Replies: 10
    Last Post: 21 Nov 2007, 09:35 AM
  3. Paypal IPN ALL orders don't show up in Admin
    By theng6987 in forum Built-in Shipping and Payment Modules
    Replies: 4
    Last Post: 23 Sep 2007, 04:26 PM
  4. New users and orders don't show up in Admin
    By jaztechnologies in forum General Questions
    Replies: 1
    Last Post: 6 Jul 2007, 02:02 AM
  5. Revisting Customers - Need to Show in orders.php
    By phil_lazenby in forum Managing Customers and Orders
    Replies: 0
    Last Post: 21 Jun 2006, 11:16 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR