Luis B Posted May 2, 2014 Share Posted May 2, 2014 Hello, I like to insert html code in the product description.The code will be different for each product. Is this possible? I am using Prestashop 1.4.10 Thanks Luis Link to comment Share on other sites More sharing options...
NemoPS Posted May 3, 2014 Share Posted May 3, 2014 Hi! You should be able to do it normally, just click the small 'html' box in the rich editor of the product description Link to comment Share on other sites More sharing options...
idoityourself Posted October 6, 2014 Share Posted October 6, 2014 Im having the same issue in 1.6.0.9 Id like to add line breaks and italics etc to the large product description but none of it is going through. Ive tried doing it manually in the source code box and it still won't work Link to comment Share on other sites More sharing options...
vekia Posted October 7, 2014 Share Posted October 7, 2014 can you show code that you're trying to use? also it can be a case of theme (css styles can remove visibility of html markups) Link to comment Share on other sites More sharing options...
lateral Posted October 7, 2014 Share Posted October 7, 2014 I'm interested in this post as well. I have been trying to format the Description filed in Products for sometime now and it seems to ignore formatting when displayed on the Front Office. Bold, underline etc works but I just want to simply insert either single or multiple blank lines between each sentence or paragraph but is just "wraps" all of text. Link to comment Share on other sites More sharing options...
NemoPS Posted October 8, 2014 Share Posted October 8, 2014 In that case, you have to get rid of |strip_tags in the template, be it product.tpl or product-list.tpl Link to comment Share on other sites More sharing options...
lateral Posted October 8, 2014 Share Posted October 8, 2014 How do I do that? Link to comment Share on other sites More sharing options...
NemoPS Posted October 8, 2014 Share Posted October 8, 2014 for example, in the list <p class="product-desc" itemprop="description"> {$product.description_short|strip_tags:'UTF-8'|truncate:360:'...'} </p> to <div class="product-desc" itemprop="description"> {$product.description_short|truncate:360:'...'} </div> Link to comment Share on other sites More sharing options...
lateral Posted October 8, 2014 Share Posted October 8, 2014 Thanks Nemo, Why does it have the Strip code if it causes this problem? Link to comment Share on other sites More sharing options...
vekia Posted October 9, 2014 Share Posted October 9, 2014 {$product.description_short|truncate:360:'...'} it's worth to mention that with truncate and without strip_tags some html tags from begining parts of product.description variable will not be closed. These unclosed tags can generate some theme problems. Link to comment Share on other sites More sharing options...
NemoPS Posted October 10, 2014 Share Posted October 10, 2014 True, would be better to remove truncate as well Link to comment Share on other sites More sharing options...
lateral Posted October 10, 2014 Share Posted October 10, 2014 Hi guys So, what would the new code look like without the "truncate"? Link to comment Share on other sites More sharing options...
lateral Posted October 11, 2014 Share Posted October 11, 2014 Hi guys I tried this and could not get it to work. I basically want to be able to insert blank lines between the paragraphs in a Product Description in the Back Office and have the blank lines displayed in the Front Office. Link to comment Share on other sites More sharing options...
Bill Dalton Posted October 11, 2014 Share Posted October 11, 2014 (edited) lateral, Prestashop and other open source projects make use of other "open source" projects. For example both PS and Word Press use PHP and MySQL. Additionally PS makes use of Smarty, jQuery and TinyMCE. TinyMCE is the editor you use when entering descriptions. My point here is the PS uses a chain of open source projects. So to solve some problems it helps to learn work around's to the individual software projects that add to your powerfull PS shop. If you have used the method posted above to remove the html striping tag, and you find that the WYSIWYG editor provided by TinyMCE is causing you problems, then make use of the HTML feature provided by TinyMCE, and use a couple of old fashion html tags. The <br> tag inserts a single line break. Two <br> tags inserts a double line break. Just click on the HTML button on your TinyMCE editor to insert any HTML directly. Easypeasy. Edited October 11, 2014 by Bill Dalton (see edit history) Link to comment Share on other sites More sharing options...
lateral Posted October 11, 2014 Share Posted October 11, 2014 Hi and thanks for the reply. I understand what you are saying and will do what you suggest. 1 Link to comment Share on other sites More sharing options...
DanGB Posted October 12, 2014 Share Posted October 12, 2014 Hello, I am also trying to add multiple line breaks in the Description field. But its stripping it, or not applying it. Looking through the code, I can only see strip_tags applied to the 'short_description' fields though. Link to comment Share on other sites More sharing options...
lateral Posted October 12, 2014 Share Posted October 12, 2014 Hi Dan This is what I needed to do to get the formatting that I wanted: <p>Mounting tabs - Steel tabs for various applications , many different styles.<br /><br /></p><p>Price is "from" price.</p> This gives me the spacing I required. Link to comment Share on other sites More sharing options...
DanGB Posted October 13, 2014 Share Posted October 13, 2014 Hi Greg, This does work, but... Surely there must be a easy way via the WYSIWYG editor? My client would be horrified if I tell them this is the only way for such a simple function! Thanks, Dan Link to comment Share on other sites More sharing options...
lateral Posted October 13, 2014 Share Posted October 13, 2014 Hi Dan, I agree, it would be great if the editor could do this automatically but it looks like it can't at the moment and this is the only workaround I know of. Let me know if you find out anything else. Link to comment Share on other sites More sharing options...
JUICYDESIGN Posted August 22, 2016 Share Posted August 22, 2016 (edited) Hi Guys, sorry that I'm talking about between them ;-) But we have sameless problem.... we format entrys from product - shortdescription especially bold, breaks etc but doesnt work. All formatted text in frointend shows in one line without format... how can we solve this? Thanks for help We use PS Version 1.6.1.4 Edited August 22, 2016 by JUICYDESIGN (see edit history) Link to comment Share on other sites More sharing options...
selectshop.at Posted August 22, 2016 Share Posted August 22, 2016 Hi Guys, sorry that I'm talking about between them ;-) But we have sameless problem.... we format entrys from product - shortdescription especially bold, breaks etc but doesnt work. All formatted text in frointend shows in one line without format... how can we solve this? Thanks for help We use PS Version 1.6.1.4 Are you talking about imported products ? You can use HTML-editor on your back-officve on product description. There is an icon for HTML-code. For import it is true you cannot manage HTML. Better is import raw text and than format it manually. 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