Post by kungmats » Thu Feb 19, 2015 5:34 pm

As topic says ...

If I enter the text for a product like:
ABC
123

It shows like ABC123 on category pages. How can that be fixed?

Active Member

Posts

Joined
Tue Jan 25, 2011 11:00 pm

Post by BrettMW » Fri Feb 20, 2015 2:58 am

Hi kungmats,

Make sure you are not editing in HTML mode. You can toggle this by clicking the icon as highlighted in the image below
Image

If it still won't work, try using "<br />" instead of a new line, for example:

Code: Select all

ABC<br />123

Website | Follow us on LinkedIn


User avatar
New member

Posts

Joined
Thu Feb 19, 2015 10:03 am


Post by kungmats » Fri Feb 20, 2015 3:17 pm

Thank you but this is not the problem.
On the product page it looks ok, it's just on tha category pages line break does not work.

I've tryed to change though to <br /> instead of <br> but it does not matter

Active Member

Posts

Joined
Tue Jan 25, 2011 11:00 pm

Post by yodapt » Fri Feb 20, 2015 3:19 pm

Do you have a url?

Opencart Developer - My Extension Showcase
Contact me at aeon.yoda@gmail.com


User avatar
Active Member

Posts

Joined
Fri Jun 17, 2011 6:39 pm


Post by kungmats » Fri Feb 20, 2015 3:35 pm

All products on the page, and I have the same problem with standard theme and this milano I use now

The url is changed to
http://maddy.se/

Active Member

Posts

Joined
Tue Jan 25, 2011 11:00 pm

Post by BrettMW » Sat Feb 21, 2015 4:34 am

Which OpenCart version are you using?

Website | Follow us on LinkedIn


User avatar
New member

Posts

Joined
Thu Feb 19, 2015 10:03 am


Post by kungmats » Sat Feb 21, 2015 5:10 am

2.0.1.1

Active Member

Posts

Joined
Tue Jan 25, 2011 11:00 pm

Post by BrettMW » Sat Feb 21, 2015 8:24 am

Try editing in HTML mode and putting <br /> in where you want a line break.

Website | Follow us on LinkedIn


User avatar
New member

Posts

Joined
Thu Feb 19, 2015 10:03 am


Post by kungmats » Sat Feb 21, 2015 8:58 am

I did as you can see above.
that does not help and besides, the text shows correct on the product pages. This problem is only on the category pages

Active Member

Posts

Joined
Tue Jan 25, 2011 11:00 pm

Post by BrettMW » Sat Feb 21, 2015 1:44 pm

I see what you mean now.

OpenCart removes HTML tags for the product description on the category pages. The reason for this is that it has to take a sub-string of the description (it doesn't display the whole thing on the category page), and if there are HTML tags in there it would likely break the HTML causing it to look horrific.

Therefore the new lines or paragraphs that you put in the description are removed. IMO the best way to fix this is to have descriptions that do not have a new line near the beginning to eliminate the problem.

Website | Follow us on LinkedIn


User avatar
New member

Posts

Joined
Thu Feb 19, 2015 10:03 am


Post by kungmats » Sat Feb 21, 2015 4:16 pm

Ok, but there has to be a file where I can ad like $text = nl2br($text) to fix this, but i cant find where

Active Member

Posts

Joined
Tue Jan 25, 2011 11:00 pm

Post by sully210 » Sat Sep 19, 2015 1:34 am

Has anyone found a fix for this problem? I need to be able to have short descriptions and line breaks. Nothing seems to work and I need help fast. My descriptions shows fine on my product page but in one line and un-formatted on my category page. Here is a link to my category page: http://chestersbbq.com/orders/index.php ... ry&path=20
and here is a link to my product page: http://chestersbbq.com/orders/index.php ... duct_id=50
Why does this happen and how can I fix it?
Thanks for any help.

Thank you,
Sully :)


User avatar
Active Member

Posts

Joined
Tue Jul 13, 2010 4:46 am
Location - USA
Who is online

Users browsing this forum: Bing [Bot] and 7 guests