Jump to content

[SOLVED] How can I activate HTML for the Short Description area?


Recommended Posts

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

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

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

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

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

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

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

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

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

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

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

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 by linster (see edit history)
Link to comment
Share on other sites

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 by Bill Dalton (see edit history)
  • Like 1
Link to comment
Share on other sites

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>

  • Like 2
Link to comment
Share on other sites

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 by linster (see edit history)
Link to comment
Share on other sites

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. :blink:

Edited by linster (see edit history)
Link to comment
Share on other sites

  • 1 year later...

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

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

×
×
  • Create New...