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: Turnkey Top Domain URLs with Opencart installed!
My latest OpenShop enhanced OpenCart V-Pro:
For detailled Information on URL's, please contact me at:
Hundreds of Mods in 420+ Repositories for OC v.1.5.x - v.3.x
to be found for free on my Github Site:

User avatar
Legendary Member


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

Users browsing this forum: No registered users and 38 guests