Jump to content

[Solved] Phone Number in contact or Order


TechDelavente

Recommended Posts

Hello guys,

 

I have a fast question.

 

i would like to change the phone number maxlength . The problem is ... I made xxxx grep on my server to find where to change it, impossible to find where i can find the length of the phone numbers for customers. Right now it's defined at 32 max.. But i need 10 , and need after to put some regex. Impossible to locate where ...

 

I searched in controllers, tpl in theme directory --> Addresses with a maxlength="10" . But nothing !

 

Thank you !

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

Hi Tech,

 

First of all, the database table ps_addess limits the phone numbers to Var(32). So if you want to make it longer, you have to change the database structure.

 

Furthermore in /classes/address.php the address class is defined, with in there the phone numbers:

 

'phone' => array('type' => self::TYPE_STRING, 'validate' => 'isPhoneNumber', 'size' => 32),

'phone_mobile' => array('type' => self::TYPE_STRING, 'validate' => 'isPhoneNumber', 'size' => 32),

 

Hope this helps,

pascal

Link to comment
Share on other sites

Hi Tech,

Glad I could help. Normally the basic building block definitions can be found in /classes/<objectclass>.php

Also 'database talk' of these objects can normally be found here.

Success with your shop!

Pascal

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