Jump to content

How do I Increase the max allowable character length


Recommended Posts

 

 

Reference length limit to more than 32 Characters

open classes/Product.php and change line:

'reference' =>                    array('type' => self::TYPE_STRING, 'validate' => 'isReference', 'size' => 32), 

to:

'reference' =>                    array('type' => self::TYPE_STRING, 'validate' => 'isReference', 'size' => 64),

then in shop database you have to change the definition of "reference" column from VARCHAR(32) to VARCHAR(64)

 

 

 

you can follow the same steps for other fields (btw. description does not have any limit)

Link to comment
Share on other sites

  • 2 months later...

open classes/Product.php and change line:

'reference' =>                    array('type' => self::TYPE_STRING, 'validate' => 'isReference', 'size' => 32), 

to:

'reference' =>                    array('type' => self::TYPE_STRING, 'validate' => 'isReference', 'size' => 64),

then in shop database you have to change the definition of "reference" column from VARCHAR(32) to VARCHAR(64)

 

 

 

you can follow the same steps for other fields (btw. description does not have any limit)

Hi Vekia

 

Where in the database do I find the "reference" column to change VARCHAR(32) to VARCHAR(64)? 

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

  • 4 weeks later...
  • 9 months later...

To change the VARCHAR(32) in database, just follow these steps on phpMyAdmin:

1. Find "ps_product" table (or your custom prefix).

2. Click on + to open it.

3. Click on "Columns" and scroll down to find "reference" then click on it.

image.png.24473343adb6c12f27b8ff23f28f93bc.png 

4. Now you can change Length to your custom character length.

image.png.dd94a4906171f92839a279404310c6c0.png

That's all.

Link to comment
Share on other sites

  • 4 weeks later...
  • 1 year later...

Hi @vekia, @Amin Vatandoust and all others, 

i dont want open a new topic,

i need to change the lenght of the customer service message (contact us), they are sending spams. if i make the "char size" smaller it is going to be better. 

under 

classes/customermessege .php 

            'message' => array('type' => self::TYPE_STRING, 'validate' => 'isCleanHtml', 'required' => true, 'size' => 16777216),
but it gives 500error, if char size bigger then this value, will you please help ? 

 

version 1.7.6.4

thank you very much. 

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