Jump to content

Double writing in category descriptions


Recommended Posts

I am new to prestashop. When i enter categories descriptions I am getting two paragraphs of the same writing. the first one will end with ... indicating there is more and then it starts over and prints the whole thing. 

 

skincare. Shop on-trend, customizable cutting-edge beauty and fashion. You will find your favorite...

skincare. Shop on-trend, customizable cutting-edge beauty and fashion. You will find your favorite cleansers,  toners, eye care, moisturizers, problem solvers, body treatments, value sets, skincare specials, ANEW, Avon Elements, Clearskin, Solutions

 

Any ideas?

Link to comment
Share on other sites

  • 1 month later...

I've got the same problem. Why are answers taking so long here btw?

 

I found the problem by the way. In the category.tpl there is a display: none for a <p> element that is interfering with the <p> elements that come from you editor. Your editor is placing <p> elements around the description of the category and shows them despite the display:none. If you change the <p> with <div> the display:none will work fine. Here's the solution:

- In your category.tpl on line 60 you can use the code as below; i changed the p to div:

 

 

{if strlen($category->description) > 120}

<div id="category_description_short">{$category->description|truncate:120}</div>

<div id="category_description_full" style="display:none">{$category->description}</div>

<a href="#" onclick="$('#category_description_short').hide(); $('#category_description_full').show(); $(this).hide(); return false;" class="lnk_more">{l s='More'}</a>

{else}

<div>{$category->description}</div>

{/if}

 

Hope this works. Cheers!

Link to comment
Share on other sites

×
×
  • Create New...