The € symbol is not written in the image of the gift certificates mailed


  • Default avatar
    candido    
     10 years ago
    0

    Hello.
    The € symbol is not written after the price, in the image of the gift certificates mailed. Neither the name of the currency: EUR.
    Only see two squares.
    Anyone know how to fix it?
    thanks
  • Your avatar
    seyi    
     10 years ago
    0

    Hello,

    Did you upload your own font that you are using? If so, please change the font back to the default "Arialbd". It may be that your font does not support the euro sign, assuming that is the case.
  • Default avatar
    candido    
     10 years ago
    0

    I'm using the default font "Arialbd".
    But I've also tried with my own font "Arialbd" and does not work properly. No symbol or letter appears. Only two squares.
    In the view on the BackEnd configuration, the letters you see are USD. Neither appears € or EUR.
    I'm using the version AwoCoupon Pro 2.2.6
  • Your avatar
    seyi    
     10 years ago
    0

    Hello,

    It should print the euro sign.

    I cannot produce the problem so really not sure where it is. I have done some research and found a couple solutions that ma work, but I am just not sure. If it does not work, is it possible to send me a private message with temporary ftp and admin access to try and figure it out?

    So the solution 1:
    in www/administrator/components/com_awocoupon/helpers/awolibrary.php, around line 373 is this:
    <?php
            
    if(self::writeToImage_helper($im,$value,$profile['coupon_value_config'])===false) return false;
    ?>

    Right before that line, add this
    <?php
            $value 
    str_replace('€','€',html_entity_decode($value));
    ?>

    Then test

    Solution 2:
    If that does not work then replace the new line in solution 1 with this:
    <?php
            $value 
    preg_replace('/\x80/',utf8_encode('€'),$value);
    ?>


    And then test it again
  • Default avatar
    candido    
     10 years ago
    0

    Hello. I'm sorry but none of the solutions work.

    There seems to be a problem of coding html or utf 8 to this function. The $ symbol, it works perfectly. £, ¥, €, no.

    I did a test trying also enter the € symbol in one of the free text fields, but neither works. Only two square ...

    In case this information is important, around line 373 there is any similar code to that you inform me. There's this:

            $db->setQuery($sql);

            $profile['lang_email_body'] = $db->loadResult();

            $sql = 'SELECT text

                      FROM #__awocoupon_lang_text

                     WHERE elem_id='.$profile['voucher_text_lang_id'].' AND lang IN ("'.$lang_text.'")

                     ORDER BY FIELD(lang,"'.$lang_text.'")

                     LIMIT 1';


    The closest thing to your information is this, and this in line 743, where I tried your solution:

            if(self::writeToImage_helper($im,$code,$profile['coupon_code_config'])===false) return false;

            if(self::writeToImage_helper($im,$value,$profile['coupon_value_config'])===false) return false;

            if(!empty($expiration) && !empty($profile['expiration_config'])) {

                $str = date($profile['expiration_config']['text'],$expiration);

                if(self::writeToImage_helper($im,$str,$profile['expiration_config'])===false) return false;

            }


    Other information that may be important: In the text of email, the € symbol if it appears perfectly. The error is in the image of the GIFT that is sent in the email.

    We need a solution for this problem. If you need to access the administrator or ftp, I have no objection to provide it.

    thanks
  • Your avatar
    seyi    
     10 years ago
    0

    yes please send me a private message with access so I can take a look.
  • Your avatar
    seyi    
     10 years ago
    0

    Hello,

    It is fixed now.

    In the end this was the code added instead of the code above:
    <?php
    $value 
    str_replace('€','€',$value);
    ?>
  • Default avatar
    candido    
     10 years ago
    0

    Ok.
    Now it works fine.

    Thank you very much.