Answer the question
In order to leave comments, you need to log in
Opencart 2.3 in categories in product short description problem with encoding, question marks?
opencart 2.3 in categories in the short description of the product encoding problem, question marks.
when trimming the length, there are problems with encoding ; the
length changes in the template of the category
catalog/view/theme/template/product/category.tpl
<div class="description-small">
<?php if(strlen($product['description']) > 120) { echo substr($product['description'], 0, 120) . '..'; } else { echo $product['description']; } ?>
</div>
tried mb_strlen, did not help
'description' => utf8_substr(strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8')), 0, $this->config->get($this->config->get('config_theme') . '_product_description_length')) . '..',
Answer the question
In order to leave comments, you need to log in
tried mb_strlen, did not help
<?php
if(mb_strlen($product['description']) > 120) {
echo mb_substr($product['description'], 0, 120) . '..';
} else {
echo $product['description']; }
?>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question