jdmorrisn Posted November 1, 2010 Share Posted November 1, 2010 When a cutomer registers an address there are two fields, one for home phone and one for mobile phone. I will change the text in Translations to say instead 'email address' and 'contact phone'. I have found in the address.php where to make sure that the box accepts upto 50 characters - that is not a problem - but it wont let me type in any text. only numbers. What do i have to change so that the 'phone' field can accept an email address instead? Link to comment Share on other sites More sharing options...
rocky Posted November 1, 2010 Share Posted November 1, 2010 Why do you want to add "email address" to the customer's address when they already have "email address" in the identity section? Do you want per-address email addresses instead of just one email address per customer? Link to comment Share on other sites More sharing options...
jdmorrisn Posted November 1, 2010 Author Share Posted November 1, 2010 Basically I am using the 'add address' also for delivery of gift cards (voucher codes). So if a customer buys a gift card they can have it sent directly to the recipient. The recipient may not necessarily be registered with my shop but I need their email to enable me to send the voucher code. Link to comment Share on other sites More sharing options...
rocky Posted November 2, 2010 Share Posted November 2, 2010 You need to change line 89 of classes/Address.php (in PrestaShop v1.3.2): 'phone' => 'isPhoneNumber', 'phone_mobile' => 'isPhoneNumber', 'deleted' => 'isBool'); If it is the "Phone number" that you changed to "Email address" and "Mobile phone" that you changed to "Contact phone", then you will need to change it to: 'phone' => 'isEmail', 'phone_mobile' => 'isPhoneNumber', 'deleted' => 'isBool'); Link to comment Share on other sites More sharing options...
jdmorrisn Posted November 2, 2010 Author Share Posted November 2, 2010 Ok, now it lets me input an email address, very good.But now it only saves the first 16 characters of the email - even though I changed the field length from 16 to 30. Is there somewhere else, another file I also need to change? 'phone' => 30, 'phone_mobile' => 30); Link to comment Share on other sites More sharing options...
rocky Posted November 2, 2010 Share Posted November 2, 2010 You will need to edit your database using phpAdmin and change the data type of the 'phone' field in the 'ps_address' table from varchar(16) to varchar(128) Link to comment Share on other sites More sharing options...
jdmorrisn Posted November 2, 2010 Author Share Posted November 2, 2010 Ok, how/where do I find my database? Link to comment Share on other sites More sharing options...
rocky Posted November 2, 2010 Share Posted November 2, 2010 Log in to your server's cPanel, then choose "phpMyAdmin" in the "Databases" section. Link to comment Share on other sites More sharing options...
jdmorrisn Posted November 2, 2010 Author Share Posted November 2, 2010 Sorted, thank you. Link to comment Share on other sites More sharing options...
jdmorrisn Posted November 2, 2010 Author Share Posted November 2, 2010 One final thing, perhaps a dumb question - but these databases - when I back up my files via ftp - are these databases saved also or I have to back up these via my cpanel? Link to comment Share on other sites More sharing options...
rocky Posted November 2, 2010 Share Posted November 2, 2010 You must back it up separately. Click on your database name in phpMyAdmin, then click the Export tab, make sure "Save as file" and "gzipped" is selected, then click Go at the bottom. Link to comment Share on other sites More sharing options...
jdmorrisn Posted November 2, 2010 Author Share Posted November 2, 2010 Excellent, thanks again. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now