Jump to content

Nefungují české znaky v zákaznické podpoře / Czech diacritics in customer message


simplyGD
 Share

Recommended Posts

Mám problém s českou diakritikou v zákaznickém centru u zpráv od zákazníků. Konkrétně to je z poznámky u objednávky, kterou zákazníci mohou zanechat. Posílám screen rozsypané zprávy. Může to být někde chybným nastavením fontů například UTF-8 apod? Btw neděje se u všech zpráv jen některých. Máte někdo radu?

I have a problem with Czech accents in the customer center for messages from customers. Specifically, this is from a note on the order that customers can leave. I'm sending screen message. Could it be some wrong font settings, such as UTF-8, etc.? Btw does not happen with all messages, only some. Does anyone have advice?

bug.png

Share this post


Link to post
Share on other sites

Na FTP ./classes/Tools.php změnit funkci htmlentitiesUTF8 na:

public static function htmlentitiesUTF8($string, $type = ENT_QUOTES)
    {
        if (is_array($string)) {
            return array_map(array('Tools', 'htmlentitiesUTF8'), $string);
        }
    return htmlspecialchars((string)$string, $type, "UTF-8");
    }

Share this post


Link to post
Share on other sites

  • 2 months later...

Jestli to potřebuješ u detailu objednávek, tak jsem to řešil takhle v souboru src/PrestaShopBundle/Resources/views/Admin/Sell/Order/Order/Blocks/View/msg_list_item.html.twig

řádek 35 upravit na {{ message.message|raw|nl2br }} a pak vyčistit mezipamět

<div class="messages-block-content">
        <p class="mb-0 message customer-message">
          {{ message.message|raw|nl2br }}
        </p>
        <p class="text-muted mb-0">
          {{ message.customerFirstName ~ ' ' ~ message.customerLastName }}
          {{ message.messageDate.format }}
        </p>
      </div>

 

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More