Post by vimal » Mon May 28, 2012 10:40 pm

Hello,
How can I solve this error?

Code: Select all

2012-05-26 11:13:32 - PHP Notice:  Undefined index: zone_id in /www/webvol17/ty/gnsennek25xjm7l/rethinkdesign.se/public_html/catalog/controller/account/register.php on line 322
2012-05-26 16:39:32 - PHP Notice:  Undefined index: zone_id in /www/webvol17/ty/gnsennek25xjm7l/rethinkdesign.se/public_html/catalog/controller/account/register.php on line 322

www.beeshop.se
Starta webbshop, Starta e-butik, Starta e-handel


Active Member

Posts

Joined
Wed Aug 26, 2009 8:54 am
Location - Sweden

Post by Avvici » Sat Jun 02, 2012 10:49 am

The line of code throwing the error is :

Code: Select all

if ($this->request->post['zone_id'] == '') {
      		$this->error['zone'] = $this->language->get('error_zone');
    	}
In your catalog/view/theme/your_theme/template/account/register.tpl do you have this line?

Code: Select all

<select name="zone_id">
            </select>

User avatar
Expert Member

Posts

Joined
Tue Apr 05, 2011 12:09 pm
Location - Asheville, NC

Post by vimal » Mon Jun 04, 2012 4:16 am

Yes. In my file I have this code. What should I do with it?

www.beeshop.se
Starta webbshop, Starta e-butik, Starta e-handel


Active Member

Posts

Joined
Wed Aug 26, 2009 8:54 am
Location - Sweden

Post by vimal » Thu Jun 07, 2012 3:56 am

Any advice please?

www.beeshop.se
Starta webbshop, Starta e-butik, Starta e-handel


Active Member

Posts

Joined
Wed Aug 26, 2009 8:54 am
Location - Sweden

User avatar
Expert Member

Posts

Joined
Tue Apr 05, 2011 12:09 pm
Location - Asheville, NC

Post by vimal » Thu Jun 07, 2012 5:06 am

Hi Avvici,
That post is not having the solution. We both have the code in the template file.

Code: Select all

    <tr>
              <td><span class="required">*</span> <?php echo $entry_zone; ?></td>
              <td><select name="zone_id">
                </select>
                <?php if ($error_zone) { ?>
                <span class="error"><?php echo $error_zone; ?></span>
                <?php } ?></td>
            </tr>
Hence in the registration form the select box for zone_id is there and it is named correctly. But it still shows the error.
Any suggestion what else to try?

Thanks!
Vimal.

www.beeshop.se
Starta webbshop, Starta e-butik, Starta e-handel


Active Member

Posts

Joined
Wed Aug 26, 2009 8:54 am
Location - Sweden

Post by straightlight » Thu Jun 07, 2012 5:10 am

Code: Select all

if ($this->request->post['zone_id'] == '') {
            $this->error['zone'] = $this->language->get('error_zone');
       }
to read:

Code: Select all

if (empty($this->request->post['zone_id'])) {
    $this->error['zone'] = $this->language->get('error_zone');
}

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by New Guy » Thu Jun 07, 2012 5:17 am

I've had this exact same issue. I've tried all mentionings above and nothing has worked I still get the Undefined index: zone_id

New member

Posts

Joined
Mon Apr 18, 2011 2:16 pm

Post by straightlight » Thu Jun 07, 2012 5:21 am

Are you sure this error comes from the same file and around the same line ? If so, would it be possible to post the code from that line number and from that specific file ?

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by Avvici » Thu Jun 07, 2012 5:26 am

There really is no reason in my eyes why if both tpl and control are in conjunction together that the default

Code: Select all

if ($this->request->post['zone_id'] == '') {
      		$this->error['zone'] = $this->language->get('error_zone');
    	}
won't work.

Meaning, the condition is reading the select box field name (zone_id)

Code: Select all

if (empty($this->request->post['zone_id'])) {
Would even work fine.

User avatar
Expert Member

Posts

Joined
Tue Apr 05, 2011 12:09 pm
Location - Asheville, NC
Who is online

Users browsing this forum: No registered users and 309 guests