Jump to content

SOLVED - Increase The Product Title Limit - Prestashop 1.7.8


Mario Evangelista

Recommended Posts

Hello good afternoon, I need help. I need to increase the product title limit, I already changed it in pss5_product_lang, however as soon as I try to change the title in the backoffice the message is always the same: "This value is too long. It should have 128 characters or less." Can anyone help me? Thanks.

Edited by Mario Evangelista
Solved (see edit history)
Link to comment
Share on other sites

Hello

You need to edit the core files of PS and the database. Let me explain below.

Go to the file "/src/Core/Domain/Product/ProductSettings.php" and find the constant MAX_NAME_LENGTH and increase it. 

Then go to your database and find the product_lang table. and increase the limit of the name column. That will do.

Another solution is to get modules like infofield, advanced custom field etc. that let you add advanced custom fields to your product page and then show the title with that.

Regards

TheEnumbin

Link to comment
Share on other sites

Hello, I just managed to solve it, there was just one more step left, here's a tip for anyone who needs it:

1. You need to modify in db, pss5_product_lang, increase length of the "name" to xxxx

2. prestashop\src\Core\Domain\Product\ProductSettings.php

public const MAX_NAME_LENGTH = xxxx;

3. prestashop\src\PrestaShopBundle\Form\Admin\Product\ProductInformation.php

new Assert\Length(['min' => 3, 'max' => xxxx]),

 

And its Done!

Thanks a Lot!

Edited by Mario Evangelista (see edit history)
Link to comment
Share on other sites

  • Mario Evangelista changed the title to SOLVED - Increase The Product Title Limit - Prestashop 1.7.8

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...