chief Posted April 16, 2020 Share Posted April 16, 2020 Hi, version 1.7.6.3 I have edited the database and changed products -> product_lang -> structure and updated them "name" and "link_rewrite" to this value "255" i have edited /classes/product.php and also edited "name" and "link_rewrite" changing 128 to 255, but my shop still nags the crap outta me stating too many characters.. no more than 128. What am i doing wrong, i have recompiled the shop, cleared the cache, shouted at it.. nothing changes. I have read, in relation to changing some items you have to use an override file, what code if any would i need to add to override file? /override/classes/product.php Thanks Link to comment Share on other sites More sharing options...
NPO Posted April 16, 2020 Share Posted April 16, 2020 ok - first I recommend some more shouting, cause you'll be doing some more while editing...... I have changed the title to take max 255 char and it works fine, the database keeps it, the back office will save it and the front end will display it. But - that is all I checked - so if you want to use this please make sure there are no other implications. In your database change all instances that refer to the (product)name to 255 including the meta and the ones that show up under the supply order and order state lang etc. Keep all the files changes you have made so far. Make one more edit in .../src/PrestaShopBundle/Form/Admin/Product/Productinformation.php look for the ->add('name', TranslateType::class, [ block change new Assert\Length(['min' => 3, 'max' => xxx]), ] replace xxx with the max you have in the database e.g. 255. Clear all cache, if necessary restart mysql and try saving a longer title. 1 Link to comment Share on other sites More sharing options...
danplant Posted April 29, 2020 Share Posted April 29, 2020 Hi, please how can modify to view all the text of the product description? Display the "..." dots and cut the text Thanks ! Link to comment Share on other sites More sharing options...
NPO Posted April 29, 2020 Share Posted April 29, 2020 Hi, If you want to change the length of the product name in the category listing you can go to: ...../themes/classic/templates/catalog/_partials/miniatures/product.tpl and change the number behind the 'truncate' (of $product.name) to the amount of characters you would like to show. 1 Link to comment Share on other sites More sharing options...
danplant Posted April 29, 2020 Share Posted April 29, 2020 done ! Many thanks ! Link to comment Share on other sites More sharing options...
Jcbartola Posted September 19, 2020 Share Posted September 19, 2020 (edited) I could remove the |truncate parts from the .tpl file and it worked for Mobile..... but for some reason it still shows truncated for desktop. Any clue about that? (I have cleared cache from the Performance section as well). BTW: I'm using the LeoBread theme. Edited September 19, 2020 by Jcbartola (see edit history) Link to comment Share on other sites More sharing options...
chmielu182 Posted June 26, 2022 Share Posted June 26, 2022 (edited) On 4/29/2020 at 3:29 PM, NPO said: Hi, If you want to change the length of the product name in the category listing you can go to: ...../themes/classic/templates/catalog/_partials/miniatures/product.tpl and change the number behind the 'truncate' (of $product.name) to the amount of characters you would like to show. I have version 1.7.8.6 and the correct file is right here. Thank you very much Edited June 26, 2022 by chmielu182 (see edit history) 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