Flash951 Posted April 3, 2018 Share Posted April 3, 2018 Prestashop 1.6.1.5 Is it possible to shorten the category short description text? The visible text for category short description seems truncated to 350 characters, In the product.tpl file I can replace 350 with 150, but that only affects when to display the "more" button and doesn't shorten the text. {if Tools::strlen($category->description) > 150} On the next line I tried this: <div id="category_description_short" class="rte">{$description_short|truncate:150}</div> But this change made the "more" button show no text at all. Grateful for help. Link to comment Share on other sites More sharing options...
NemoPS Posted April 4, 2018 Share Posted April 4, 2018 What if you leave the limit higher and still manually truncate it? Or you can remove that part completely and just have it show Default template? Can you share your site's url if not? Link to comment Share on other sites More sharing options...
Flash951 Posted April 4, 2018 Author Share Posted April 4, 2018 If I manually truncate it, the "more" button will not display anything. I need a lot of stuff there, but only two lines or so in the short_description initially. That's the whole point and why I want to shorten the "short description. I can not "remove that part" and let it show all the text, because the product list will be to far down, to hidden when customer visits the category. Here is link: https://www.kunnskap.no/butikk/64-jeg-kan-regne-1-4 Appreciate all help. Link to comment Share on other sites More sharing options...
NemoPS Posted April 6, 2018 Share Posted April 6, 2018 The truncate is not accurate because of html, but for the rest is seems to be working properly for me, so maybe I didn't get what you need Link to comment Share on other sites More sharing options...
Flash951 Posted April 11, 2018 Author Share Posted April 11, 2018 If I truncate, "more" button is not working, only blank page after selecting more. Link to comment Share on other sites More sharing options...
cryptix Posted October 14, 2020 Share Posted October 14, 2020 In category.tpl (Prestashop 1.6.1.24) you can try to add style="height:20.5em;overflow:hidden;", you can modify the length of the text by line. <div id="category_description_short" class="rte" style="height:20.5em;overflow:hidden;">{$category->description}</div> Link to comment Share on other sites More sharing options...
JBW Posted October 15, 2020 Share Posted October 15, 2020 Maybe my module "Expandable descriptions" can help you. It can shorten/expand category descriptons as well as many others such as product descriptions: https://addons.prestashop.com/de/product.php?id_product=49795 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