Hello. I try to generate sertifactes, upload cyrilic fonts but if I try type something on russian I see incorrect characters in jpg and pdf sertificate files.
Gift sertificate value - cyrilic font error
- Hello,What font did you upload/use?Also can you give an example of the text used?
- I tried some fonts (Arial, Century Gothic) but I think problem in render script. For example, If I edit controller.php and try to type some cyrilic characters instead of '20.00 USD' , AWO can't render preview of certificate. I searching for russian forums and I know that this problem exist from older versions of AWO. Fast method - print all cyrilic characters on background of PNG file but currency-prefix (for example cost: 1000 rub) also have cyrilic characters and script render squareboxes instead of 'rub' prefix.
- Adding cyrilic characters directly to the file will not work. For the font, it would have to support cyrilic characters to render properly.Can you give me an example of the text that is coming up in square boxes?
- For example price of gift sertificate 2000 руб.http://excam.ru/catalog/podarochnye-sertifikaty/podarochnyj-sertifikat-2000.htmlvoucher jpghttps://yadi.sk/i/JC9v2AFPwRkxDall cyrilic characters print in background png directly, AWO print only certificate cost
- Hello,I tested this using the default font, arial, and did not have any problems. Here is the preview screen before purchase:And here is the image of the voucher after purchase:So it must be something else, maybe the encoding of the website?
- encoding: UTF-8I really don't know where to look for a solution to this problem.If I try to type cyrilic characters in any text areas - preview not working. In email - squareboxes. AWO code has not been modifiedOk, please ask me how I can delete currency suffix from certificate cost?
- Hello,If you like, I can have a look, would just need you to send me a private message temp admin and ftp access.To disable the currency you would have to edit code.In www/administrator/components/com_awocoupon/helpers/estore/estoregiftcerthandler.php, around line 210 is this:
<?php
$row['coupon_row']->coupon_price = $row['coupon_row']->coupon_value_type=='amount'
? $this->formatcurrency($row['coupon_row']->coupon_value)
: round($row['coupon_row']->coupon_value).'%';
?>You can change it to this<?php
$row['coupon_row']->coupon_price = $row['coupon_row']->coupon_value_type=='amount'
? $row['coupon_row']->coupon_value
: round($row['coupon_row']->coupon_value).'%';
?>That should do it. - After these edits the price is displayed with five zeros after the decimal point
- You can round it:
<?php
? round(<span style="color:rgb(0,0,187);">$row</span><span style="color:rgb(0,119,0);">[</span><span style="color:rgb(221,0,0);">'coupon_row'</span><span style="color:rgb(0,119,0);">]-></span><span style="color:rgb(0,0,187);">coupon_value,2)</span>
<span style="color:rgb(0,0,187);">
?>Thanks for the access, after debugging, the russian characters are throwing the error below, causing the block characters to be printed:Warning: imagettfbbox() [function.imagettfbbox]: any2eucjp(): invalid code in input string
After searching the web, it seems it might be a php version issue. Are you able to upgrade? - Yes. You are absolutelyright. Changed version up to 5.4 (prev 5.3) and everything was ok. Thank you very much!