kos2 Posted February 7, 2020 Share Posted February 7, 2020 In Prestashop 1.7, in the Back Office, when you go to Catalog - Categories and the list of categories is shown, if you have many and the description of each one is very wide, it is very difficult to work because it occupies a lot of screen and is not agile . He tried by all means to limit the characters defined in the description but there is no way. He tried for 4 hours and tried solutions and nothing. It seems that the back office templates are with Twig and inside the / src / folder, but he also didn't find a way .. Anyone around here would know how to do it? Attached image that looks clear what the problem is. regards thanks Link to comment Share on other sites More sharing options...
tdsoft Posted February 12, 2020 Share Posted February 12, 2020 Hi, you can go to: src\Core\Grid\Data\Factory\CategoryDataFactory.php Change line $records[$key]['description'] = strip_tags(stripslashes($record['description'])); To $records[$key]['description'] = substr(strip_tags(stripslashes($record['description'])), 0, 20); 20 is characters display 1 Link to comment Share on other sites More sharing options...
kos2 Posted February 12, 2020 Author Share Posted February 12, 2020 Thanks a lot ! This is useful for version 1.7.6.2 but it is not useful for another website that I have in 1.7.5.2 because in the Factory folder I only get 2 files: DoctrineGridDataFactory.php and GridDataFactoryInterface.php... How do I fix in 1.7.5.2 version? thanks ! Link to comment Share on other sites More sharing options...
tdsoft Posted February 13, 2020 Share Posted February 13, 2020 In 1.7.5.0, file: controllers\admin\AdminCategoriesController.php Change return Tools::getDescriptionClean($description); To return substr(Tools::getDescriptionClean($description), 0, 20); 1 Link to comment Share on other sites More sharing options...
kos2 Posted February 14, 2020 Author Share Posted February 14, 2020 Thanks a lot! very thankful ! 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