Post by Noit » Sat Jun 30, 2018 3:06 am

The short product description, as shown in the product categorie and for example in the new products list, is all in one line, no returns. See, what is wrong?



Sat Jun 30, 2018 3:04 am

Post by IP_CAM » Sat Jun 30, 2018 9:13 am

Well, such is usually done in the controller/category.php File,
by use of the strip_tags Filter element:

Code: Select all

'description' => (strlen(utf8_decode(strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8'))))> 80 ? mb_substr(strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8')), 0, mb_strrpos(mb_substr(strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8')), 0, 55, 'UTF-8'), ' ', 0, 'UTF-8'), 'UTF-8') : strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8'))) . ' ..',
If you remove that (strip_tags( .......... )) command, the html tag <br> should work, I assume.
Check Google, if you want to find out more about such ways of filtering HTML Tags. ;)
And if you allow someone else, to create Products, one could add hidden script code, doing
bad things to your Site ! ::)
UNTESTED, as it comes!
PS: But it's purpose is also, to avoid, creating height oversized Grid-View Windows, by putting
the description content part into one single line.

For Sale: Top URL's, including an OpenCart V-Pro Installation, similar to: - -
For Information + URL's offered, please contact me at:
I am NOT available for Custom Support in existing OC Installations!
My Github Repositories:

User avatar
Guru Member


Tue Mar 04, 2014 1:37 am
Location - Switzerland
Who is online

Users browsing this forum: pprmkr and 23 guests