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

    Default [Done v155a] Admin order page shows yellow circle for comments, when there are none

    Ever since I upgraded to 1.5.5, the order page in the admin shows the yellow comment circle on every single order, regardless if they actually wrote a comment or not. Any clue why this is happening?

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

    Default Re: Admin order page shows yellow circle for comments, when there are no comments

    If there's any text in the comment field for the first order-status-history record for that order, it will flag up the comments icon. That includes if your payment module put payment-related information in there. (Usually payment-related comments end up in a 2nd comment, so as to not clash with this customers-comment flag.)
    .

    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
    Jan 2014
    Location
    Arizona
    Posts
    107
    Plugin Contributions
    1

    Default Re: Admin order page shows yellow circle for comments, when there are no comments

    Thanks DrByte, but the comment section is empty. This is flagging on every order, and only since I upgraded to 1.5.5.

  4. #4
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Admin order page shows yellow circle for comments, when there are no comments

    Then I'd check:
    a) what's in the comments field in every orders_status_history record for those orders.
    b) has the zen_get_order_comments() function definition been changed in your admin functions files

    ... cuz that function looks up all the comments on the order, by order number, grabs the first one in sort order of being added to the db, and if the comments field is not blank, the yellow icon is displayed.
    .

    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.

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

    Default Re: Admin order page shows yellow circle for comments, when there are no comments

    DrByte, I checked the comments in the database, pre-1.5.5 the empty comments are '', post-1.5.5 the comments are ' '

    Would having the space in the comments make it so that the flag would show? This would make sense why there is nothing showing in the order itself since a space doesn't show in text format, but does show that a character is in fact in the box.

    Where would I find the extra space so I can remove it?

    Thank you!

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

    Default Re: Admin order page shows yellow circle for comments, when there are no comments

    Quote Originally Posted by jwlamb View Post
    Would having the space in the comments make it so that the flag would show? This would make sense why there is nothing showing in the order itself since a space doesn't show in text format, but does show that a character is in fact in the box.
    That's exactly what it was. I ran an export, removed the extra space from each order that didn't have comments and imported the new database. The flags disappeared, so the flag is showing correctly, just trying to find where the extra space is in the php. It's in the paypal checkout, I did a test order using a gift certificate and the extra space wasn't there. I'll post results when I find them.

    Thank you.

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

    Default Re: Admin order page shows yellow circle for comments, when there are no comments

    Oh wow, talk about a needle in a haystack!

    Fortunately it's only related to PayPal Express Checkout.

    In v155 we added the ability for the store to record any notes the customer enters on the PayPal side ... and because there are two parts to that, we dropped a space in between to separate them for readability. Unfortunately that space survives even when the customer enters no comments.

    The fix is simple ... in the paypalwpp.php module, line 1838 you have:
    Code:
    'order_comment'   => urldecode($response['NOTE']) . ' ' . urldecode($response['PAYMENTREQUEST_0_NOTETEXT']),
    Change it to this:
    Code:
    'order_comment'   => (isset($response['NOTE']) || isset($response['PAYMENTREQUEST_0_NOTETEXT']) ? urldecode($response['NOTE']) . ' ' . urldecode($response['PAYMENTREQUEST_0_NOTETEXT']) : ''),

    Another approach could be the following, but I prefer the above approach because the following one is cleaning up what's added, instead of not adding it in the first place:
    Code:
    'order_comment'   => trim(urldecode($response['NOTE']) . ' ' . urldecode($response['PAYMENTREQUEST_0_NOTETEXT'])),
    .

    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.

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

    Default Re: Admin order page shows yellow circle for comments, when there are no comments

    Thanks DrByte, that worked. I received an order and doesn't show as comments. When my next order with comments comes through I'll let you know that it works for both.

    Thanks again!

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

    Default Re: Admin order page shows yellow circle for comments, when there are no comments

    Quote Originally Posted by jwlamb View Post
    Thanks DrByte, that worked. I received an order and doesn't show as comments. When my next order with comments comes through I'll let you know that it works for both.

    Thanks again!
    Finally got an order with comments, it works. I was starting to get concerned.

 

 

Similar Threads

  1. v155 [Done v155a] Admin, alt_nav not working
    By torvista in forum Bug Reports
    Replies: 13
    Last Post: 3 Nov 2016, 07:26 PM
  2. v154 None of the default Shipping, Payment or Order Total Modules appear in my Admin Page
    By ZacYonekawa in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 1 May 2016, 12:06 AM
  3. Replies: 1
    Last Post: 25 Mar 2016, 04:45 PM
  4. v151 Auto populate Comments in admin order page
    By time111 in forum Customization from the Admin
    Replies: 1
    Last Post: 13 Aug 2013, 07:37 PM
  5. Replies: 0
    Last Post: 10 Jul 2007, 08:28 PM

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