Emoji Problem.

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.

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.
@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.

How can we block using emojis in fields section ?

Hi

i have problem to add emojis in description kindly let me know if the solutions is same for that , because when i save the description with the emojis its change to "???????"

Kindly let me know how to solve it

Thanks

Did you try the solution from bug tracker?

http://forum.cs-cart.com/tracker/issue-6937-emoji-to-emails/?view=findpost&p=27351

bug tracker?

is the link is for solution i requested? if yes i understand 1-3 numbers

but how to do exactly number 4? do you have any video Tutorial`?

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.

After that I was able to paste and save emojis to the subject and body of an email template.
Many Thanks

It can be done, for example, in phpMyAdmin

https://prnt.sc/rjncd6

https://prnt.sc/rjncv3

It can be done, for example, in phpMyAdmin

https://prnt.sc/rjncd6

https://prnt.sc/rjncv3

Hi

Many thanks for your kind reply, i have changed as you said, i also changed it to the app/Tygh/Database/Connection.php file. but nothing happend. ive cleard cache, nothing happend!

please see the screenshot!

https://prnt.sc/rjtnvx

any other Suggestion?

Thanks

Did you change correct table in the database?

Did you change correct table in the database?

Hi thanks for the reply please check the screenshot here i uploaded https://prnt.sc/rjtnvx

Do you want to add emoji to text banners?

Do you want to add emoji to text banners?

I want to add emoji in title item description and any other text field

So you should not change the cscart_banners table. Change the table where the required data is stored