Community Forums

Edit "account_create"

Template support & advice for OpenCart v0.x

Edit "account_create"

Postby Jacob » Mon Dec 22, 2008 4:46 pm

I would like change the login form, where do I do this and would this cause any problems? I looked in administration but didn't see any option for this.


Not Mandatory
Telephone

Make Mandatory
Post code


Thanks
Last edited by Jacob on Mon Dec 22, 2008 7:07 pm, edited 1 time in total.
Jacob
 
Posts: 164
Joined: Thu Dec 04, 2008 1:17 pm

Re: Login details

Postby Qphoria » Mon Dec 22, 2008 5:23 pm

Assume by login you mean "account_create"

EDIT: catalog/controller/account_create.php
FIND (Line 188):
Code: Select all
       if ((strlen($request->gethtml('telephone', 'post')) < 3) || (strlen($request->gethtml('telephone', 'post')) > 32)) {
            $this->error['telephone'] = $language->get('error_telephone');
       }

REPLACE WITH:
Code: Select all
       if ((strlen($request->gethtml('[color=red]postcode[/color]', 'post')) < 3) || (strlen($request->gethtml('[color=red]postcode[/color]', 'post')) > [color=red]10[/color])) {
            $this->error['[color=red]postcode[/color]'] = $language->get('error_[color=red]postcode[/color]');
       }



EDIT: catalog/langauge/english/controller/account_create.php
FIND:
Code: Select all
$_['error_telephone']      = '* Telephone must be greater than 3 and less than 32 characters!';

REPLACE WITH:
Code: Select all
$_['error_[color=red]postcode[/color]']      = '* [color=red]Postcode[/color] must be at least 3 and less than 10 characters!';




EDIT: catalog/template/default/content/account_create.tpl
FIND:
Code: Select all
<td><span class="required">*</span> <?php echo $entry_telephone; ?></td>

REPLACE WITH:
Code: Select all
<td><?php echo $entry_telephone; ?></td>


FIND:
Code: Select all
<td><?php echo $entry_postcode; ?></td>

REPLACE WITH:
Code: Select all
<td><span class="required">*</span> <?php echo $entry_postcode; ?></td>
Image Image
Donate!|OpenCart Basics|GeoZones
Help me get more development cloud storage - Click Here to get DropBox
User avatar
Qphoria
Administrator
 
Posts: 18209
Joined: Mon Jul 21, 2008 7:02 pm
Donate to Qphoria

Re: Edit "account_create"

Postby Jacob » Mon Dec 22, 2008 7:06 pm

Yes,  "account_create" I am so careless, or maybe I am tired?

Thank you so much that is a great help.
Last edited by Jacob on Mon Dec 22, 2008 7:08 pm, edited 1 time in total.
Jacob
 
Posts: 164
Joined: Thu Dec 04, 2008 1:17 pm

Re: Edit "account_create"

Postby Jacob » Tue Dec 23, 2008 5:03 pm

Qphoria

Your guide explains how to edit account_creating. So to keep continuity throughout the site I would also need to edit:

account_address
account_edit
checkout_address

in these files:
catalog/controller/file_name.php
catalog/langauge/english/controller/file_name.php
catalog/template/default/content/file_name.tpl

If that is correct then maybe I could post the edits I do to be checked over?
Jacob
 
Posts: 164
Joined: Thu Dec 04, 2008 1:17 pm

Re: Edit "account_create"

Postby Qphoria » Tue Dec 23, 2008 5:13 pm

Jacob wrote:Qphoria

Your guide explains how to edit account_creating. So to keep continuity throughout the site I would also need to edit:

account_address
account_edit
checkout_address


account_edit yes
but account_address and checkout_address don't have validation on phone, unless you just want to add validation on postcode, then yes
Image Image
Donate!|OpenCart Basics|GeoZones
Help me get more development cloud storage - Click Here to get DropBox
User avatar
Qphoria
Administrator
 
Posts: 18209
Joined: Mon Jul 21, 2008 7:02 pm
Donate to Qphoria

Re: Edit "account_create"

Postby Jacob » Tue Dec 23, 2008 7:08 pm

I have done no further edits other than the first guided edit. I tried to create a new account using different details and got message:

'If you already have an account with us, please login at the login page.'
Last edited by Jacob on Tue Dec 23, 2008 7:10 pm, edited 1 time in total.
Jacob
 
Posts: 164
Joined: Thu Dec 04, 2008 1:17 pm

Re: Edit "account_create"

Postby Jacob » Tue Dec 23, 2008 7:42 pm

Actually what am I talking about? I tried to get rid of:

City
Country
Company
fax
region/state

Please see attachments for my edits.
Attachments
acount_create.php2.txt
(10.42 KiB) Downloaded 168 times
acount_create.php.txt
(2.51 KiB) Downloaded 194 times
acount_create.txt
(7.09 KiB) Downloaded 186 times
Jacob
 
Posts: 164
Joined: Thu Dec 04, 2008 1:17 pm

Re: Edit "account_create"

Postby Jacob » Tue Dec 23, 2008 7:54 pm

Confirmation, I  undid my attempts and your code is good  :) so my further edits are to blame for:

'If you already have an account with us, please login at the login page.'
Jacob
 
Posts: 164
Joined: Thu Dec 04, 2008 1:17 pm

Re: Edit "account_create"

Postby Jacob » Wed Dec 24, 2008 1:44 pm

Any chance someone could have a look through the atachments above to see where I am going wrong  ;D
Jacob
 
Posts: 164
Joined: Thu Dec 04, 2008 1:17 pm


Return to Template Support

Who is online

Users browsing this forum: No registered users and 3 guests

Hosted by Arvixe Web Hosting