Studio1one Posted July 30, 2013 Share Posted July 30, 2013 How can I remove the word "more" in category description text and have it open all the time? prestashop 1.5 Please anyone? Link to comment Share on other sites More sharing options...
vekia Posted July 30, 2013 Share Posted July 30, 2013 hello you use default template? Link to comment Share on other sites More sharing options...
vekia Posted July 30, 2013 Share Posted July 30, 2013 you should check the category.tpl file located in the template directory there is something like: {if strlen($category->description) > 120} <p id="category_description_short">{$category->description|truncate:120}</p> <p id="category_description_full" style="display:none">{$category->description}</p> <a href="#" onclick="$('#category_description_short').hide(); $('#category_description_full').show(); $(this).hide(); return false;" class="lnk_more">{l s='More'}</a> {else} <p>{$category->description}</p> {/if} instead this code (above), put there just: <p id="category_description_full" style="display:none">{$category->description}</p> 1 Link to comment Share on other sites More sharing options...
Studio1one Posted July 30, 2013 Author Share Posted July 30, 2013 you should check the category.tpl file located in the template directory there is something like: {if strlen($category->description) > 120} <p id="category_description_short">{$category->description|truncate:120}</p> <p id="category_description_full" style="display:none">{$category->description}</p> <a href="#" onclick="$('#category_description_short').hide(); $('#category_description_full').show(); $(this).hide(); return false;" class="lnk_more">{l s='More'}</a> {else} <p>{$category->description}</p> {/if} instead this code (above), put there just: <p id="category_description_full" style="display:none">{$category->description}</p> What I have in my code is this: {if $category->description} {if strlen($category->description) > 300} <p class="cat_desc bordercolor bgcolor" id="category_description_short">{$category->description|truncate:300} <a href="#" onclick="$('#category_description_short').hide(); $('#category_description_full').show(); $(this).hide(); return false;" class="lnk_more">{l s='More'}</a></p> <p class="cat_desc bordercolor bgcolor" id="category_description_full" style="display:none">{$category->description}</p> {else} <p class="cat_desc bordercolor bgcolor">{$category->description}</p> {/if} {/if} {if isset($subcategories)} Link to comment Share on other sites More sharing options...
vekia Posted July 30, 2013 Share Posted July 30, 2013 so instead the code that you pasted above use only this: <p class="cat_desc bordercolor bgcolor">{$category->description}</p> will work, definitely Link to comment Share on other sites More sharing options...
Studio1one Posted July 30, 2013 Author Share Posted July 30, 2013 so instead the code that you pasted above use only this: <p class="cat_desc bordercolor bgcolor">{$category->description}</p> will work, definitely That did not work, I could not even load the category. Link to comment Share on other sites More sharing options...
vekia Posted July 30, 2013 Share Posted July 30, 2013 hello it's because you probably removed also the last line: {if isset($subcategories)} this line is necessary, dont remove it remove only this: {if $category->description} {if strlen($category->description) > 300} <p class="cat_desc bordercolor bgcolor" id="category_description_short">{$category->description|truncate:300} <a href="#" onclick="$('#category_description_short').hide(); $('#category_description_full').show(); $(this).hide(); return false;" class="lnk_more">{l s='More'}</a></p> <p class="cat_desc bordercolor bgcolor" id="category_description_full" style="display:none">{$category->description}</p> {else} <p class="cat_desc bordercolor bgcolor">{$category->description}</p> {/if} {/if} Link to comment Share on other sites More sharing options...
Studio1one Posted July 30, 2013 Author Share Posted July 30, 2013 hello it's because you probably removed also the last line: {if isset($subcategories)} this line is necessary, dont remove it remove only this: {if $category->description} {if strlen($category->description) > 300} <p class="cat_desc bordercolor bgcolor" id="category_description_short">{$category->description|truncate:300} <a href="#" onclick="$('#category_description_short').hide(); $('#category_description_full').show(); $(this).hide(); return false;" class="lnk_more">{l s='More'}</a></p> <p class="cat_desc bordercolor bgcolor" id="category_description_full" style="display:none">{$category->description}</p> {else} <p class="cat_desc bordercolor bgcolor">{$category->description}</p> {/if} {/if} Then everything disapear, Maybe I explain bad. I have a description text there, look at the link: http://www.hairofbeauty.com/hair-extensions/sv/3-clip-in-hair I dont want to have the expand function there, I want it to be open always. Link to comment Share on other sites More sharing options...
vekia Posted July 30, 2013 Share Posted July 30, 2013 hello that's right because there is "display:none" - i modified the code, try with this one, should help so instead the whole code that i mentioned before, use this: <p class="cat_desc bordercolor bgcolor" id="category_description_full">{$category->description}</p> Link to comment Share on other sites More sharing options...
Studio1one Posted July 30, 2013 Author Share Posted July 30, 2013 hello that's right because there is "display:none" - i modified the code, try with this one, should help so instead the whole code that i mentioned before, use this: <p class="cat_desc bordercolor bgcolor" id="category_description_full">{$category->description}</p> Mucho Grazie Senor ;-) It works. Link to comment Share on other sites More sharing options...
eleazar Posted July 30, 2013 Share Posted July 30, 2013 (edited) Hey guys, why so complicated? Just change <p class="cat_desc bordercolor bgcolor" id="category_description_short">{$category->description|truncate:300} <a href="#" onclick="$('#category_description_short').hide(); $('#category_description_full').show(); $(this).hide(); return false;" class="lnk_more">{l s='More'} </a></p> by removing the link and the truncate-statement to: <p class="cat_desc bordercolor bgcolor" id="category_description_short">{$category->description}</p> This should work. Edited July 30, 2013 by eleazar (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted July 30, 2013 Share Posted July 30, 2013 complicated? the simplest way, just remove unwanted code hehehe i marked this topic as [solved] regards Link to comment Share on other sites More sharing options...
eleazar Posted July 30, 2013 Share Posted July 30, 2013 Link to comment Share on other sites More sharing options...
Recommended Posts