Post by katapult » Tue Aug 10, 2010 3:09 pm

How to make - Region / State: - optional , when customer is registering? I think I have to change something in catalog/view/theme/default/template/account/create.tpl but what and how ? Thanks in advance for your answer.

New member

Posts

Joined
Fri Sep 11, 2009 5:17 am

Post by kedgetech » Tue Aug 10, 2010 4:25 pm

You might need to remove the validation in controller class. [TAKE A BACKUP OF THE FILES]

catalog/controller/account/create.php
comment the following code
if (isset($this->error['zone'])) {
$this->data['error_zone'] = $this->error['zone'];
} else {
$this->data['error_zone'] = '';
}


and the following code
if ($this->request->post['zone_id'] == 'FALSE') {
$this->error['zone'] = $this->language->get('error_zone');
}



Also you need to remove red star in
/view/theme/default/template/account/create.tpl
to make customer know that its not mandatory.

Hope this helps.

User avatar
Active Member

Posts

Joined
Mon Mar 22, 2010 5:20 pm
Location - USA, Australia, India

Post by dbstr » Tue Aug 10, 2010 4:40 pm

If you dont want the customer to select a zone for a certain country, maybe this could help you: http://forum.opencart.com/viewtopic.php?f=20&t=8349

Request Reviews v1.0 released.


Active Member

Posts

Joined
Sun Aug 30, 2009 12:20 am

Post by katapult » Tue Aug 10, 2010 5:58 pm

Thanks a lot. It works.

New member

Posts

Joined
Fri Sep 11, 2009 5:17 am

Post by kedgetech » Tue Aug 10, 2010 8:46 pm

I am glad it worked for you.

User avatar
Active Member

Posts

Joined
Mon Mar 22, 2010 5:20 pm
Location - USA, Australia, India
Who is online

Users browsing this forum: No registered users and 49 guests