Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    7,541
    Plugin Contributions
    284

    Default Emojis in order comments

    The current generation of idiots can't express themselves without relying on emojis, so you have to change the comments field in orders_status_history to utf8mb4 if you haven't done so.
    The short fix is just a couple of clicks in phpMyAdmin.

    You will know you have this problem if you see an error log like this:

    Code:
    myDEBUG-20201127-051659-023637-error.log:--> PHP Fatal error: 1366:Incorrect string value: '\xF0\x9F\x98\x80. ...' for column `mydb`.`orders_status_history`.`comments` at row 1 :: INSERT INTO orders_status_history (orders_id, orders_status_id, date_added, customer_notified, comments) VALUES ('34303', '1', now(), '1', 'I am an idiot.  As proof, here's an emoji! . Have a nice day.') ==> (as called by) /includes/functions/database.php on line 44 <== in /includes/classes/db/mysql/query_factory.php on line 170.
    There's another thread on this but it's a bit long so I thought I'd post this for easier reference.

    To change from your current collation to utf8mb4 in phpMyAdmin
    - select the order_status_history table
    - click Change on the comments row
    - under collation, select utf8mb4_general_ci
    - press Save
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.

  2. #2
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    7,541
    Plugin Contributions
    284

    Default Re: Emojis in order comments

    Note that this is a short term fix - when you have time, the complete fix is to update your tables to UTF8MB4 as described in this article:

    https://docs.zen-cart.com/user/upgra...nvert_to_utf8/
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.

  3. #3
    Join Date
    Oct 2007
    Location
    Stevenage, GB
    Posts
    64
    Plugin Contributions
    0

    Default Re: Emojis in order comments

    I don't get why you need to use emojis in professional email order notifications?
    - Freelance Software Developer

  4. #4
    Join Date
    Jul 2012
    Posts
    15,449
    Plugin Contributions
    17

    Default Re: Emojis in order comments

    Quote Originally Posted by web-project View Post
    I don't get why you need to use emojis in professional email order notifications?
    This works in either side, the customer entering an emoji within the note field while checking out or as seen "fit" within the admin section to populate the comments.

    While I don't have ready access to many emojis, there are far better ones than a typical smile, wink, or laugh. Use of any such image could actually make the message more professional and/or personalized. Everyone's business is different and has different customers. Such imagery may not work for one business but does for another.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...
    Upgraded to Zen Cart V1.5.3 from V1.5.1 from V1.5.0 from V1.3.9h

  5. #5
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    7,541
    Plugin Contributions
    284

    Default Re: Emojis in order comments

    Quote Originally Posted by web-project View Post
    I don't get why you need to use emojis in professional email order notifications?
    The first entry per order in the OSH table is entered by the customer, not the storeowner.
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.

  6. #6
    Join Date
    Dec 2007
    Location
    Payson, AZ
    Posts
    1,041
    Plugin Contributions
    14

    Default Re: Emojis in order comments

    When you go mobile, emojis are everywhere not just comments but contact us too.. Like in old school where YELLING vs not yelling, expressing oneself is in Emojis... Who knows what the future well hold...

    I know there was a reason to setup my database with utf8mb4_general_ci as the default...
    Thanks Scott.
    Dave
    Always forward thinking... MySite..

 

 

Similar Threads

  1. v154 Searching order comments
    By perfumbg in forum Managing Customers and Orders
    Replies: 5
    Last Post: 27 May 2016, 09:46 PM
  2. Order Comments
    By Andy_GS in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 4 Dec 2009, 04:16 PM
  3. My Order History and Order History Details - how do I get order comments in both?
    By trisha1581 in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 29 Nov 2007, 06:37 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