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?
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?
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.
Thanks DrByte, but the comment section is empty. This is flagging on every order, and only since I upgraded to 1.5.5.
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.
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!
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.
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:Change it to this:Code:'order_comment' => urldecode($response['NOTE']) . ' ' . urldecode($response['PAYMENTREQUEST_0_NOTETEXT']),
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.
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!
Bookmarks