Jump to content

delete the limit of 255 characters ....


Recommended Posts

Take backups

 

Locate the file /installroot//classes/FeatureValue.php, change:

 

protected	 $fieldsSizeLang = array('value' => 255);

 

to

 

protected	 $fieldsSizeLang = array('value' => 512);

 

Use PHPMyAdmin or similar and locate table PREFIX_feature_value_lang. Change column data type from VARCHAR(255) to VARCHAR(512)

Link to comment
Share on other sites

If you mean unlimited, no. There is database and engine enforced row and column limits. Using the same data type (VARCHAR) you can safely go up to several thousands characters, just increase the value 512 (within reason) to whatever you think will be enough, though using too long of a feature value name will surely mess up the display in several places in FO and BO.

Link to comment
Share on other sites

  • 1 year later...

This code no longer works on Prestashop 1.5.6.2

the code now is different

 

So, to change the description max 255 character limit on features field

find and open the file classes/FeatureValue.php

and find this code: 

// Lang fields
			'value' => 		array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'required' => true, 'size' => 255)

change to:

// Lang fields
			'value' => 		array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'required' => true, 'size' => 512)

Use PHPMyAdmin or similar and locate table PREFIX_feature_value_lang. Change column data type from VARCHAR(255) to VARCHAR(512) 

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