Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Emoji Problem. Rate Topic   - - - - -

 
  • webus
  • Member
  • Members
  • Join Date: 13-Jul 13
  • 43 posts

Posted 05 April 2018 - 09:23 AM #1

There are text fields on product pages. 

Clients sometimes add emojis to those fields (for example, to gift note) 
and then when they go to their carts, cart looks empty. 

Try this a emoji as sample. 
😀
 
How can we fix this? 
 
Best Regards.


 
  • ikoshkin
  • Tech Writer
  • CS-Cart Architects
  • Join Date: 25-Nov 15
  • 194 posts

Posted 05 April 2018 - 11:14 AM #2

There are text fields on product pages. 

Clients sometimes add emojis to those fields (for example, to gift note) 
and then when they go to their carts, cart looks empty. 

Try this a emoji as sample. 

 
How can we fix this? 
 
Best Regards.


Please refer to this comment, it might help. Note that the comment describes adding emojis to email templates, but a similar method should work for other tables and fields in the database.

 
  • webus
  • Member
  • Members
  • Join Date: 13-Jul 13
  • 43 posts

Posted 05 April 2018 - 11:59 AM #3

@ikoshkin

When we do this process, you say it should fix fields,  right?
 
************
 
1. Open the app/Tygh/Database/Connection.php file.
 
2. Find this part of the code:
 
if (empty($params['names'])) {
     $params['names'] = 'utf8';
}
3. Replace it with:
 
if (empty($params['names'])) {
     $params['names'] = 'utf8mb4';
}
4. Change the collations of the relevant columns from utf8_general_ci to utf8mb4_general_ci. For example, to be able to save emojis in email templates, I had to alter the collation of the subject and template columns in the cscart_template_emails table.


 
  • webus
  • Member
  • Members
  • Join Date: 13-Jul 13
  • 43 posts

Posted 07 April 2018 - 09:46 AM #4

How can we block using emojis in fields section ?