Jump to content

[SOLVED] Max alowed characters in FEATURES "Customized" field


Recommended Posts

Hi,

I would like to know how to increase max alowed character under product description FEATURES "Customized" field.

For example I would like to put ingredients for my product in one of these fields but if I add too much character I get error message:
"name for feature xxx is too long. You do not have permission to edit anything here."

does someone know how to edit this? Is this possible?

Also see the pic for reference.

Tinechem

22972_RAhbsG6SlEWweowTF838_t

  • Like 1
Link to comment
Share on other sites

This is not easy to do, so you shouldn't do it unless you are comfortable messing around with your database and code. The problem is that the size of the feature name in the ps_feature_lang table of the database is 128 characters and of the feature value name in the ps_feature_value_lang is 255 characters. You'd have to increase these values if you want to enter more characters than that. You'd then also need to change line 21 of classes/Feature.php:

protected     $fieldsSizeLang = array('name' => 128);



Increase 128 to the number of characters you increased the size of the name field to in the ps_feature_lang table.

and change line 26 of classes/FeatureValue.php:

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



Increase 255 to the number of characters you increased the size of the name field to in the ps_feature_value_lang table.

  • Like 2
Link to comment
Share on other sites

I am looking for a module or codechange to be able to put an additional tab in the product page but that is personalized for each product. this way I could avoid database change you mentioned above.

Do you know for any solution like this.

Link to comment
Share on other sites

  • 3 months later...
  • 3 years later...
  • 1 year later...
  • 4 months later...

Best way I have found is to use a CMS page and link to it from your Features - no limit there boys

 

Let me elaborate on that a bit...you have to put the link under the product descriptions - not in features - features does not allow a link for some odd reason

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

  • 6 months later...

This is not easy to do, so you shouldn't do it unless you are comfortable messing around with your database and code. The problem is that the size of the feature name in the ps_feature_lang table of the database is 128 characters and of the feature value name in the ps_feature_value_lang is 255 characters. You'd have to increase these values if you want to enter more characters than that. You'd then also need to change line 21 of classes/Feature.php:

 

protected     $fieldsSizeLang = array('name' => 128);

Increase 128 to the number of characters you increased the size of the name field to in the ps_feature_lang table.

 

and change line 26 of classes/FeatureValue.php:

 

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

Increase 255 to the number of characters you increased the size of the name field to in the ps_feature_value_lang table.

 

Hi, I'm using PS 1.6.1.1 and I increased numbers in both php's to 500 but when I hit save button only 255 letters are saved and shown in datasheet at product page.

Any idea?

 

Thanks in advance.

Link to comment
Share on other sites

  • 2 years later...
On 11/28/2015 at 9:24 AM, Krneki said:

Hi, I'm using PS 1.6.1.1 and I increased numbers in both php's to 500 but when I hit save button only 255 letters are saved and shown in datasheet at product page.

Any idea?

 

Thanks in advance.

 

You need to increase the VARCHAR value limit in your database. Inside phpMyAdmin go to table "ps_feature_value_lang". Then go to structure tab and for row "value" change column "type" VARCHAR value to the number of characters you set in the PS file. 

 

Screen Shot 2018-03-16 at 11.24.50 AM.png

Edited by dirtrider118
add image (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...