linster Posted June 18, 2012 Share Posted June 18, 2012 Hi, may I know if there is any way that I can activate html for short description? Currently it's just a string of words. This is the website that I am working on now: http://gramercy.powweb.com/musicstore/product.php?id_product=97 Appreciate any help. Thanks! Link to comment Share on other sites More sharing options...
Bill Dalton Posted June 18, 2012 Share Posted June 18, 2012 linster, in your back office > in your catalog > on your product page, you should see the rich text editors. One for the short description and one for the long description. Let me know if they are working for you. Link to comment Share on other sites More sharing options...
Dh42 Posted June 18, 2012 Share Posted June 18, 2012 The short description actually sanitizes the text that is entered in it and you cannot add html. It is because of things like your short description is used for links on your products-list page and things like that. Link to comment Share on other sites More sharing options...
linster Posted June 18, 2012 Author Share Posted June 18, 2012 Hi Bill, thanks for your reply. The short and long description have rich text editor. However, the short description's rich text editor is not working as it is once I click on save. It automatically displays a staing of text without any bold, or line breaking as typed. Even when I use the html editor to insert the coding, it doesn't work. I'm suspecting it could be due to the template's CSS but I have not idea where to change it. Will you be able to advise me? linster, in your back office > in your catalog > on your product page, you should see the rich text editors. One for the short description and one for the long description. Let me know if they are working for you. Link to comment Share on other sites More sharing options...
linster Posted June 18, 2012 Author Share Posted June 18, 2012 Hi DesignHaus42, I see... ok if that's the case, can I do without the short description for the product list instead so that I can have html for the product pages? The short description actually sanitizes the text that is entered in it and you cannot add html. It is because of things like your short description is used for links on your products-list page and things like that. Link to comment Share on other sites More sharing options...
Dh42 Posted June 18, 2012 Share Posted June 18, 2012 I have never done it, so I do not know for 100% sure. You might create more problems for yourself with it being used in other places of your shop. But if you want to go ahead and try doing it, this article should give you an idea of what to do, even though it is for category descriptions. You would have to find the short description part instead. http://www.jellygnite.com.au/blog/index.php/archive/update-display-html-in-prestashop-category-description-v-1-4/ Link to comment Share on other sites More sharing options...
linster Posted June 18, 2012 Author Share Posted June 18, 2012 hihi I have already done this for the Category section. It worked. I thought of it but just wasn't sure how to change the coding to suit this portion. I have never done it, so I do not know for 100% sure. You might create more problems for yourself with it being used in other places of your shop. But if you want to go ahead and try doing it, this article should give you an idea of what to do, even though it is for category descriptions. You would have to find the short description part instead. http://www.jellygnite.com.au/blog/index.php/archive/update-display-html-in-prestashop-category-description-v-1-4/ Link to comment Share on other sites More sharing options...
Dh42 Posted June 18, 2012 Share Posted June 18, 2012 I haven't actually done it before. So I am not 100% sure to be quite honest. Link to comment Share on other sites More sharing options...
Bill Dalton Posted June 18, 2012 Share Posted June 18, 2012 Sorry about my reply. I’m working on my first site and haven’t as yet started to enter the descriptions. I had just assumed because of the TinyMCE that I’d have freedom. This is really going to restrict what I can do. Good joke by the programmer that put in the useless TinyMCE. Link to comment Share on other sites More sharing options...
linster Posted June 18, 2012 Author Share Posted June 18, 2012 haha ya you are right. bad for me cos my client is insisting that I make that work... ||| Sorry about my reply. I’m working on my first site and haven’t as yet started to enter the descriptions. I had just assumed because of the TinyMCE that I’d have freedom. This is really going to restrict what I can do. Good joke by the programmer that put in the useless TinyMCE. Link to comment Share on other sites More sharing options...
Bill Dalton Posted June 18, 2012 Share Posted June 18, 2012 Actually I just gave it a try and mine works! I just added a HTML Size Chart, please see the description here, http://roxor.ca/en/tops/47-324t.html So you can add HTML, so I don’t know why it isn’t working for you. 1 Link to comment Share on other sites More sharing options...
Bill Dalton Posted June 18, 2012 Share Posted June 18, 2012 (edited) Ouch! Doesn't look to good in the Category page .... http://roxor.ca/en/11-tops Edited June 18, 2012 by Bill Dalton (see edit history) Link to comment Share on other sites More sharing options...
linster Posted June 18, 2012 Author Share Posted June 18, 2012 That's great! Well I seriously think it's got to do with my template. It probably is locked to 'not' recognise html. how? ... ... Oh i can make do away with the product description on the Product List page. Actually I just gave it a try and mine works! I just added a HTML Size Chart, please see the description here, http://roxor.ca/en/tops/47-324t.html So you can add HTML, so I don’t know why it isn’t working for you. Link to comment Share on other sites More sharing options...
Bill Dalton Posted June 18, 2012 Share Posted June 18, 2012 I always like to fix things myself if I can, but for something like this I can tell I'm going to need help. A post in the help wanted forum can get this sort of customization done for a very good price. I met a real wiz who I now use for this type of thing. I'm going to need a separate tinyMCE just for HTML Category product descriptions. I can see a need to have a different set of information displayed differently than what may be used on the product page. I may also need 2 short descriptions. Leave the default as is for a one line'er, and then one for use on the Product page. Link to comment Share on other sites More sharing options...
Dh42 Posted June 18, 2012 Share Posted June 18, 2012 It strips the html out except on the product page. Listner, check your css file and see if you have strong set to normal weight. That could be your problem. But it will only display on the product page. Link to comment Share on other sites More sharing options...
linster Posted June 18, 2012 Author Share Posted June 18, 2012 Yes I have done that. {margin:0;padding:0;border:0;outline:0;font-size:12px;font-weight:normal;vertical-align:top;background:transparent;outline:none;} It worked well for the Long Description but the Short Description was unaffected. It strips the html out except on the product page. Listner, check your css file and see if you have strong set to normal weight. That could be your problem. But it will only display on the product page. Can you intro him to me in case I can't fix it? I always like to fix things myself if I can, but for something like this I can tell I'm going to need help. A post in the help wanted forum can get this sort of customization done for a very good price. I met a real wiz who I now use for this type of thing. I'm going to need a separate tinyMCE just for HTML Category product descriptions. I can see a need to have a different set of information displayed differently than what may be used on the product page. I may also need 2 short descriptions. Leave the default as is for a one line'er, and then one for use on the Product page. Link to comment Share on other sites More sharing options...
linster Posted June 18, 2012 Author Share Posted June 18, 2012 (edited) My products.tpl says this below coding for Short descriptions: {* short descriptions *} {if $product->description_short} <div id="short_description_block" class="bordercolor"> {if $product->description_short} <div id="short_description_content" class="rte align_justify">{$product->description_short|strip_tags}</div> {/if} {if $product->description} <p class="buttons_bottom_block"><a href="javascript:{ldelim}{rdelim}" class="button">{l s='More details'}</a></p> {/if} </div> {/if} May be I need to make changes here to include the below CSS? /* ——————————————————————————————————— rte ——————————————————————————————————— */ body#cms div.content_only {padding:0 20px 20px 20px;background:#fff;color:#000;text-align:left;} body#cms div.content_only h1 {padding:14px 0 0 0;font:normal 18px "Arial";color:#777;text-transform:uppercase;} body#cms div.content_only h2 {padding:14px 0 0 0;font:bold 14px "Arial";color:#777;text-transform:uppercase;} body#cms div.content_only h3 {padding:14px 0 0 0;font:bold 12px "Arial";color:#777;text-transform:uppercase;} body#cms div.content_only h4, body#cms div.content_only h5, body#cms div.content_only h6 {padding:14px 0 0 0;font:normal 12px "Arial";color:#777;text-transform:uppercase;} body#cms div.content_only p {padding-top:12px;font:normal 12px "Arial";color:#000;} body#cms div.content_only a {font:normal 12px "Arial";color:#0753b4;text-decoration:none;} body#cms div.content_only a:hover {color:#000;} body#cms div.content_only ul {list-style-type:circle;list-style-position:inside;} body#cms div.content_only ol {list-style-type:decimal;list-style-position:inside;} div.rte strong {font-weight:bold;} div.rte em {font-style:italic;} div.rte table {border-collapse:separate;border-spacing:1px;width:auto;} div.rte caption, div.rte th, div.rte td, div.rte table {text-align:left;font-weight:normal;background:none;height:inherit;border:1px #eee solid;font:normal 12px "Arial";color:#000;text-align:center;} div.rte th {height:24px;padding:0 7px;background:#eee;font-weight:bold;} Edited June 18, 2012 by linster (see edit history) Link to comment Share on other sites More sharing options...
Bill Dalton Posted June 18, 2012 Share Posted June 18, 2012 (edited) That first part you posted is basically what I have in Product.tpl. In Globle CSS I have, /* short description */ #primary_block #short_description_block, #primary_block #short_description_content, #primary_block #short_description_content p {margin:14px 0 0 0;padding:0;} >>Can you intro him to me in case I can't fix it? I PM'ed you the info. Edited June 18, 2012 by Bill Dalton (see edit history) 1 Link to comment Share on other sites More sharing options...
Dh42 Posted June 18, 2012 Share Posted June 18, 2012 Post a link to your site. It can be so many different things affecting it. Link to comment Share on other sites More sharing options...
linster Posted June 18, 2012 Author Share Posted June 18, 2012 I did... This is the website that I am working on now: http://gramercy.poww...p?id_product=97 Post a link to your site. It can be so many different things affecting it. Link to comment Share on other sites More sharing options...
Bill Dalton Posted June 18, 2012 Share Posted June 18, 2012 Looking at your line, <div id="short_description_content" class="rte align_justify">{$product->description_short|strip_tags}</div> You have this - |strip_tags}</div> I do not. I have, <div id="short_description_content" class="rte align_justify">{$product->description_short}</div> 2 Link to comment Share on other sites More sharing options...
Bill Dalton Posted June 18, 2012 Share Posted June 18, 2012 I found the same thing in my product-list.tpl and removed the strip_tags} I now have HTML product descriptions on my category page, http://roxor.ca/en/11-tops Need to clean it up, but you get the idea ... 1 Link to comment Share on other sites More sharing options...
linster Posted June 19, 2012 Author Share Posted June 19, 2012 Whao!!! it works!!! Thank you so much Bill! I found the same thing in my product-list.tpl and removed the strip_tags} I now have HTML product descriptions on my category page, http://roxor.ca/en/11-tops Need to clean it up, but you get the idea ... 1 Link to comment Share on other sites More sharing options...
Bill Dalton Posted June 19, 2012 Share Posted June 19, 2012 Glad it worked out. Good luck to you linster. Your store is looking great. 1 Link to comment Share on other sites More sharing options...
linster Posted June 19, 2012 Author Share Posted June 19, 2012 thank you it's look greater becos of your help May i know how can I edit the top to include [sOLVED]? Glad it worked out. Good luck to you linster. Your store is looking great. Link to comment Share on other sites More sharing options...
Bill Dalton Posted June 19, 2012 Share Posted June 19, 2012 That got me as well the first time. Located beside the "Post" button is another button called "More Reply Options". Click on that and you may edit your thread title. Link to comment Share on other sites More sharing options...
linster Posted June 19, 2012 Author Share Posted June 19, 2012 (edited) Thanks Bill. but I still don't see anywhere to do so. after clicking on that button. hmmm... Tried finding solutions on the forum but no luck. That got me as well the first time. Located beside the "Post" button is another button called "More Reply Options". Click on that and you may edit your thread title. Edited June 19, 2012 by linster (see edit history) Link to comment Share on other sites More sharing options...
Bill Dalton Posted June 19, 2012 Share Posted June 19, 2012 Sorry, I gave you bad info. You need to go to your first post, click on edit, choose "Use Full Editor". That should do it. Link to comment Share on other sites More sharing options...
linster Posted June 19, 2012 Author Share Posted June 19, 2012 (edited) I thought so too. did that and it didn't work. The Full editor doesn't work on my com... I'm suspecting if it could be due to my Flash version or Firefox 13.0.1 Sorry, I gave you bad info. You need to go to your first post, click on edit, choose "Use Full Editor". That should do it. Edited June 19, 2012 by linster (see edit history) Link to comment Share on other sites More sharing options...
Bill Dalton Posted June 19, 2012 Share Posted June 19, 2012 Not to worry linster, they can't say we didn't try. 1 Link to comment Share on other sites More sharing options...
linster Posted June 19, 2012 Author Share Posted June 19, 2012 hahaha... u r right. thanks Not to worry linster, they can't say we didn't try. Link to comment Share on other sites More sharing options...
miradoro Posted April 16, 2014 Share Posted April 16, 2014 hi guys did you solve how to add html code into short description? Link to comment Share on other sites More sharing options...
vekia Posted April 16, 2014 Share Posted April 16, 2014 hi guys did you solve how to add html code into short description? what prestashop version you use? everything depends on it. Link to comment Share on other sites More sharing options...
miradoro Posted April 16, 2014 Share Posted April 16, 2014 i removed escape:'htmlall':'UTF-8' from {$product.description_short|truncate:460:'...'} it did the trick.....why do have that restriction anyways? All it does is developers to start hating it and go away....anyways i think it will do the trick Link to comment Share on other sites More sharing options...
vekia Posted April 16, 2014 Share Posted April 16, 2014 it's not god idea to remove escape:'htmlall':'UTF-8' when you use truncate modifier. for example, in produt description_shor youv'e got code: <table><tr><td>this is my code</td><tr></table> now you use on this variable: |truncate:25 modifier this modifier "cuts" all of the code from 25 sign. your output will look like: <table><tr><td>this is my code</td><tr></table> as you can see your <table><tr><td> will be unclosed! this can cause a lot of troubles in website structure Link to comment Share on other sites More sharing options...
miradoro Posted April 16, 2014 Share Posted April 16, 2014 solution? Link to comment Share on other sites More sharing options...
miradoro Posted April 16, 2014 Share Posted April 16, 2014 worked fine in IE8-10 and chrome so far and i see </td></table> Link to comment Share on other sites More sharing options...
vekia Posted April 16, 2014 Share Posted April 16, 2014 it works because you use 480 value in truncate, but if your description will be longer, it will cut all code above this value. solution? remove truncate modifier too Link to comment Share on other sites More sharing options...
Recommended Posts