viper2583 Posted June 24, 2014 Share Posted June 24, 2014 (edited) Hi I work with theme default on prestashop 1.6. I would like make a list for short description of product on page category. I would like the same presentation, in list, because when i need to read information, its more simple with list presentation. I seach a answer on internet and i tried to do that myself but I have not succeeded. If my explanation does not clear, please do not hesitate to ask me more details, because i have a bad english (im french its normal ^^) thanks in advance. Cordially Edited June 24, 2014 by viper2583 (see edit history) Link to comment Share on other sites More sharing options...
viper2583 Posted June 25, 2014 Author Share Posted June 25, 2014 Someone here please need help Link to comment Share on other sites More sharing options...
dioniz Posted June 25, 2014 Share Posted June 25, 2014 Do you mean you need product description in grid? Link to comment Share on other sites More sharing options...
viper2583 Posted June 26, 2014 Author Share Posted June 26, 2014 Hi, No i mean, I would like something like this : If its possible have a same presantation of information product, on this page : I hope now you know what I mean. Thanks in advance Cordiallly Link to comment Share on other sites More sharing options...
dioniz Posted June 26, 2014 Share Posted June 26, 2014 Try to turn off HTMLPurifier Library in BO > Preferences > General Link to comment Share on other sites More sharing options...
viper2583 Posted June 27, 2014 Author Share Posted June 27, 2014 Hi, it does not work I think for create this presentation, prestashop use a js file (global.js) but I don't find where and how Prestashop make a list for page product, because in product.tpl he make this : {if $product->description_short} <div id="short_description_content" class="rte align_justify" itemprop="description">{$product->description_short}</div> {/if} but where is code for create a list. Maybe if I find where he do something to create a list, I can copy it and do the same for category page. Cordially Link to comment Share on other sites More sharing options...
viper2583 Posted July 4, 2014 Author Share Posted July 4, 2014 (edited) Hi, Someone can help me please, I need to do that before the end of my internship. If i ask it's because I tried to do this work myself but i don't find how to do. Thank in advance for any help. Cordially Edited July 4, 2014 by viper2583 (see edit history) Link to comment Share on other sites More sharing options...
viper2583 Posted July 24, 2014 Author Share Posted July 24, 2014 Hi, If you want do the same modification you just need to delete "strip_tags:'UTF-8". In file product.tpl, you need to find this line : {hook h='displayProductListReviews' product=$product} <p class="product-desc" itemprop="description"> {$product.description_short|strip_tags:'UTF-8'|truncate:360:'...'} </p> Delete tthe red text and tadahhhh !!! you have a list and not a block. Do not hesitate if you have a question. Cordially Link to comment Share on other sites More sharing options...
vekia Posted July 24, 2014 Share Posted July 24, 2014 remember that it can generate conflict in html markups for example you've got code: <div><p>This is my description</p></div> then you use |truncate:20 modifier code will be cutted after 20 chars <div><p>This is my description</p></div> <div><p> tags will be unclosed then! it can affect website structure! Link to comment Share on other sites More sharing options...
floreauwe Posted November 30, 2015 Share Posted November 30, 2015 Hy there! I have the same problem and I tried to apply what you`ve wrote but with no luck..., https://www.dropbox.com/s/mobs08la9ygr182/Screenshot-Florea%20Uwe.JPG?dl=0 How to do it? Link to comment Share on other sites More sharing options...
divamvak Posted March 20, 2017 Share Posted March 20, 2017 (edited) In file product.tpl, you need to find this line : {hook h='displayProductListReviews' product=$product} <p class="product-desc" itemprop="description"> {$product.description_short|strip_tags:'UTF-8'|truncate:360:'...'} </p> Delete tthe red text and tadahhhh !!! you have a list and not a block. Is this the solution to upload image in short description in product page? Edited March 20, 2017 by divamvak (see edit history) Link to comment Share on other sites More sharing options...
William K. Posted February 2, 2018 Share Posted February 2, 2018 Hello, I was wondering if it was possible to achieve that while avoiding the issue @vekia raised. What I mean is, being able to only apply the "truncate" to the "text" part of the description. If my truncate is set to 10, the description <div><p>This is my description</p></div> would then show "This is my" instead of "Th" like it currently works. Would love to have a solution to that so if you have the start of an idea, please share with us Thanks 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