Post by erebus » Thu Jun 05, 2014 10:20 pm

I made this mod in order to show only the first sentence (until the first . or 200 first chars) of the description
while listing products. I thing it is prettier that the default of showing the first whatever 100 characters.

open

Code: Select all

catalog/controller/product/category.php
near line 250 find

Code: Select all

'description' => utf8_substr(strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8')), 0, 100) . '..',
and replace with

Code: Select all

'description' => utf8_substr(strip_tags(html_entity_decode(strstr($result['description'], '.', true), ENT_QUOTES, 'UTF-8')), 0, 200) . '.',
I increased the length to 200 chars in case of a big sentence.

Happy coding! :crazy:

Newbie

Posts

Joined
Thu May 15, 2014 3:06 pm
Who is online

Users browsing this forum: No registered users and 4 guests