Jump to content

[SOLVED] Increase State maxlength


Detelin Markov

Recommended Posts

Hi everyone,

 

I want to increase State (field) in BO to 160 character`s and i make these changes:

in controllers/admin/AdminStateControllers.php

			'input' => array(
				array(
					'type' => 'text',
					'label' => $this->l('Name:'),
					'name' => 'name',
					'size' => 160,
					'maxlength' => 160,
					'required' => true,
					'desc' => $this->l('Provide the State name to be display in addresses and on invoices.')
				),

and in classes/State.php

	public static $definition = array(
		'table' => 'state',
		'primary' => 'id_state',
		'fields' => array(
			'id_country' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true),
			'id_zone' => 	array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true),
			'iso_code' => 	array('type' => self::TYPE_STRING, 'validate' => 'isStateIsoCode', 'required' => true, 'size' => 7),
			'name' => 		array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'required' => true, 'size' => 160),
			'active' => 	array('type' => self::TYPE_BOOL, 'validate' => 'isBool'),
		),
	);

But now save only first 62 Characters (if i calculate right), where else i need to increase these numbers may be in MSQL?

 

post-335617-0-46478100-1394536955_thumb.pngpost-335617-0-26859000-1394536961_thumb.png

 

Thanks,

Detelin

Edited by Detelin Markov (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...