Доброй ночи!
Подскажите пожалуйста как поправить вывод description под категорий на главной странице.
Нужно что бы текст выводился одинаковым количеством строк, что бы кнопка подробнее не прыгала (смотрите скриншот)
Как я понял то за это отвечает это:
public function TrimText($text, $count){
$text = str_replace(" ", " ", $text);
$string = explode(" ", $text);
for ($wordCounter = 0; $wordCounter <= $count;$wordCounter++) {
$trimed .= $string[$wordCounter];
if(strlen($trimeed) >= $count) break;
if($wordCounter < $count){
$trimed .= " ";
}
}
$trimed = trim($trimed);
return $trimed;
}
$children_data[] = array(
'image' => $child['image'],
'description' => $this->TrimText(strip_tags(html_entity_decode($child['description'])),12),
'name' => $child['name'],
'href' => $this->url->link('product/category', 'path=' . $category['category_id'] . '_' . $child['category_id'])
);
Но что и как править я не понимаю:(
Надеюсь на Вашу помощь.