Post by Jacob » Tue Dec 23, 2008 12:46 am

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 Tue Dec 23, 2008 3:07 am, edited 1 time in total.

Running v1.5.5.1


Active Member

Posts

Joined
Thu Dec 04, 2008 9:17 pm

Post by Qphoria » Tue Dec 23, 2008 1:23 am

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>

OpenCart 2.0.x Mod Update Info

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Jacob » Tue Dec 23, 2008 3:06 am

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 Tue Dec 23, 2008 3:08 am, edited 1 time in total.

Running v1.5.5.1


Active Member

Posts

Joined
Thu Dec 04, 2008 9:17 pm

Post by Jacob » Wed Dec 24, 2008 1:03 am

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?

Running v1.5.5.1


Active Member

Posts

Joined
Thu Dec 04, 2008 9:17 pm

Post by Qphoria » Wed Dec 24, 2008 1:13 am

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

OpenCart 2.0.x Mod Update Info

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Jacob » Wed Dec 24, 2008 3:08 am

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 Wed Dec 24, 2008 3:10 am, edited 1 time in total.

Running v1.5.5.1


Active Member

Posts

Joined
Thu Dec 04, 2008 9:17 pm

Post by Jacob » Wed Dec 24, 2008 3:42 am

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

City
Country
Company
fax
region/state

Please see attachments for my edits.

Running v1.5.5.1


Active Member

Posts

Joined
Thu Dec 04, 2008 9:17 pm

Post by Jacob » Wed Dec 24, 2008 3:54 am

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

Running v1.5.5.1


Active Member

Posts

Joined
Thu Dec 04, 2008 9:17 pm

Post by Jacob » Wed Dec 24, 2008 9:44 pm

Any chance someone could have a look through the atachments above to see where I am going wrong  ;D

Running v1.5.5.1


Active Member

Posts

Joined
Thu Dec 04, 2008 9:17 pm
Who is online

Users browsing this forum: No registered users and 4 guests