gregor123 Posted April 25, 2012 Share Posted April 25, 2012 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 Link to comment Share on other sites More sharing options...
doubleD Posted April 25, 2012 Share Posted April 25, 2012 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 More sharing options...
gregor123 Posted April 25, 2012 Author Share Posted April 25, 2012 hmm it works... but it also moves the price under description and also "add to cart" and "view" button under the picture Link to comment Share on other sites More sharing options...
doubleD Posted April 26, 2012 Share Posted April 26, 2012 hmm it works... but it also moves the price under description and also "add to cart" and "view" button under the picture well, you have to modify css and/or layout in product-list.tpl file... Link to comment Share on other sites More sharing options...
Publisher Posted November 30, 2012 Share Posted November 30, 2012 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 More sharing options...
Destiny84 Posted February 12, 2013 Share Posted February 12, 2013 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. 2 Link to comment Share on other sites More sharing options...
dlnhi Posted October 2, 2013 Share Posted October 2, 2013 Thanks loads Destiny84!!! This seems to work. Link to comment Share on other sites More sharing options...
expertgazfioul Posted October 12, 2013 Share Posted October 12, 2013 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?? Great! thank you! Link to comment Share on other sites More sharing options...
yonni Posted March 12, 2014 Share Posted March 12, 2014 It works ! Great THANK YOU VERY MUCH Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now