Jump to content

increase product name length not working


chief

Recommended Posts

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

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.

 

 

255title.jpg

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

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.

 

  • Like 1
Link to comment
Share on other sites

  • 4 months later...
  • 1 year later...
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 by chmielu182 (see edit history)
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...