sscardefield Posted March 31, 2013 Share Posted March 31, 2013 (edited) PrestaShop 1.5.3 I am trying to increase the amount of characters that show in the category description before needing to click "More". The default is 120 characters, which is one line. I'd like to up it to something like 8 lines. I have changed the two category description settings in the category.tpl to 1000, but it made no difference. Is there something I'm missing? {if $category->description} <div class="cat_desc"> {if strlen($category->description) > 1000} <p id="category_description_short">{$category->description|truncate:1000}</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} </div> {/if} Edited March 31, 2013 by sscardefield (see edit history) Link to comment Share on other sites More sharing options...
Paulito Posted March 31, 2013 Share Posted March 31, 2013 Silly question, you have tried force compile etc Paul Link to comment Share on other sites More sharing options...
sscardefield Posted March 31, 2013 Author Share Posted March 31, 2013 Yes, I have tried with Force compilation on and off. Link to comment Share on other sites More sharing options...
sscardefield Posted April 1, 2013 Author Share Posted April 1, 2013 I feel embarrased reporting this, but I was in the wrong theme. I have like 10 themes loaded, all with weird random generated names from the theme creator I used for my site, so I had gotten confused on which one was currently loaded. Link to comment Share on other sites More sharing options...
Drage-Birger Posted April 15, 2014 Share Posted April 15, 2014 Hey Guys, This is fantastic! I just did this modification on my shop: DrageByen.dk and it worked like a charm... While I was at it, I also removed the gray box that was around the category-description... That made it all look so much better...! Thank you so much...! Sincerely, Birger Link to comment Share on other sites More sharing options...
chsode Posted May 6, 2014 Share Posted May 6, 2014 (edited) Hi guys. I tried to do the same on my website Medieplaneten.dk - but with no luck. I tried to apply the following code: {if $display_category_desc && $category->description} <div class="cat_desc"> {if (!isset($sttheme.display_cate_desc_full) || !$sttheme.display_cate_desc_full) && strlen($category->description) > 1000} {if isset($description_short)} <div id="category_description_short">{$description_short|truncate:1000}</div> {else} <div id="category_description_short" style="height:1.5em;overflow:hidden;">{$category->description|truncate:1000}</div> {/if} <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 go">{l s='More'}</a> {else} <div>{$category->description}</div> {/if} </div> {/if} </div> Any ideas what i did wrong? Best regards Christian Edited May 6, 2014 by chsode (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted May 6, 2014 Share Posted May 6, 2014 i cant find any product on your website with this button Link to comment Share on other sites More sharing options...
chsode Posted May 6, 2014 Share Posted May 6, 2014 i cant find any product on your website with this button True. I changed the design as i could not get it to work. I wanted it to either show as i wanted it to, or just move it down under the products, and as i could not get it to work i decided to move it instead Link to comment Share on other sites More sharing options...
Jagotic Posted September 30, 2017 Share Posted September 30, 2017 Works for me, really great 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