Try this code:
Code: Select all
{{ custom_block[lang]['description'] | convert_encoding('UTF-8', 'HTML-ENTITIES') }}
Output: ľšÄťžýáÃé
What is correct way?
Code: Select all
{{ custom_block[lang]['description'] | convert_encoding('UTF-8', 'HTML-ENTITIES') }}
Thanks
Opencart Expert | voldemaras@gmail.com
Skype - programanija | Gtalk - voldemaras@gmail.com
Extensions for Opencart @ https://www.opencartextensions.eu / or Opencart Marketplace
Need Custom Module? debug third party module or simply have any question related to Opencart? feel free to contact directly for a live chat session:) - INSTANT LIVE CHAT
Code: Select all
<div class="tab-content">
{% for language in languages %}
<div id="tab8-language-{{ language.language_id }}" class="tab-pane">
<div class="form-group">
<div class="col-sm-10">
<textarea name="custom_block[{{ language.language_id }}][description]" data-toggle="summernote" data-lang="{{ summernote }}" class="form-control" id="input-description8{{ language.language_id }}">{{ custom_block[language.language_id].description ? custom_block[language.language_id].description }}</textarea>
</div>
</div>
</div>
{% endfor %}
</div>
Code: Select all
if (isset($this->request->post['custom_block'])) {
$data['custom_block'] = $this->request->post['custom_block'];
} else {
$data['custom_block'] = $this->config->get('custom_block');
}
Code: Select all
$data['config_language_id'] = $this->config->get('config_language_id');
$data['custom_block'] = $this->config->get('custom_block');
Code: Select all
{% set lang = config_language_id %}
{% if custom_block[lang]['description'] %}
{{ custom_block[lang]['description'] | convert_encoding('UTF-8', 'HTML-ENTITIES') }}
{% endif %}
Thanks
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Here, I have not use any third party extension. I have build my self module. and, it was working fine for older OpenCart version. but, this issue does create for latest opencart version 3.0.2.0.straightlight wrote: ↑Thu Jan 04, 2018 7:08 pmCaused by an installed extension. If downloaded from the marketplace, contact the extension developer to resolve this issue.
Code: Select all
<?php if($custom_block == 1) {
if(isset($custom_block[$lang]['description']) && $custom_block[$lang]['description']!=""){?>
<?php echo html_entity_decode($custom_block[$lang]['description'], ENT_QUOTES, 'UTF-8'); ?>
<?php } ?>
Code: Select all
{% if custom_block[lang]['description'] %}
{{ custom_block[lang]['description'] | convert_encoding('UTF-8', 'HTML-ENTITIES') }}
{% endif %}
<?php } ?>
Thanks
chinese.png (2.59 KiB) Viewed 2107 times
OC 2.3.0.2
Users browsing this forum: No registered users and 509 guests