Jump to content

New line in product list - short description


gregor123

Recommended Posts

Hi,

 

Anyone maybe knows how to make new line in product list description, so it will look the same as short description at product review.

 

I want to have same text with new lines in product review description and product list description. When I write product description and when i check it out in product list there are no lines in product description, it replaces "new line" with "space".

 

i have prestashop 1.4.7

post-355305-0-60863800-1335359266_thumb.png

Link to comment
Share on other sites

Hi,

 

Anyone maybe knows how to make new line in product list description, so it will look the same as short description at product review.

 

I want to have same text with new lines in product review description and product list description. When I write product description and when i check it out in product list there are no lines in product description, it replaces "new line" with "space".

 

i have prestashop 1.4.7

 

I think you have to enable short description html, to do so edit product-list.tpl file and remove " |strip_tags:'UTF-8' " from " {$product.description_short|truncate:360:'...'|strip_tags:'UTF-8'} "

Link to comment
Share on other sites

  • 7 months later...

I think you have to enable short description html, to do so edit product-list.tpl file and remove " |strip_tags:'UTF-8' " from " {$product.description_short|truncate:360:'...'|strip_tags:'UTF-8'} "

 

Does not work for me!

{$product.description_short|truncate:360:'...'}

 

Also does not work.

{$product.description_short|replace:' ':' '}

 

Printing {$product.description_short} Gives me the string with   spaces. In the DB the string has no  

 

What i have to do?? :(

Link to comment
Share on other sites

  • 2 months later...

I know this topic is already a few months old, but maybe someone encouters the same problem.

I solved it by editing product-list.tpl and changing

{$product.description_short|strip_tags:'UTF-8'|truncate:360:'...'}

(around line 45)

to

{strip_tags($product.description_short,'<br>')|truncate:360:'...'}

 

This strips everything except the newlines.

  • Like 2
Link to comment
Share on other sites

  • 7 months later...
  • 2 weeks later...
  • 4 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...