Post by Goliath » Mon Sep 01, 2014 3:36 am

Today I tried to make a custom customer account page, named "test", just containing a simple text, and input field.
However I can't get it seem to work.. I'm getting the following errors:

Code: Select all

Notice: Indirect modification of overloaded property ControllerAccountTest::$data has no effect in /htdocs/catalog/controller/account/test.php on line 42
and in the input field displays the following:

Code: Select all

<b>Notice</b>: Undefined variable: daag in <b>/htdocs/catalog/view/theme/default/template/account/test.tpl</b> on line <b>23</b>
My template (tpl) file contains the following:

Code: Select all

		<div class='col-sm-10'>
		<input type='text' name='daag' value='<?php echo $daag; ?>' placeholder='<?php echo $entry_daag; ?>' id='input-daag' class='form-control' />
		              <?php if ($error_daag) { ?>
              <div class="text-danger"><?php echo $error_daag; ?></div>
              <?php } ?>
		</div>
My controller contains:

Code: Select all

$data['entry_daag'] = $this->language->get('entry_daag');
		if (isset($this->request->post['daag'])) {$this->data['daag'] = $this->request->post['daag'];} else {$this->data['daag'] = '';}
				if (isset($this->error['daag'])) {
			$data['error_daag'] = $this->error['daag'];
		} else {
			$data['error_daag'] = '';
		}
And my language file:

Code: Select all

$_['entry_daag'] = 'Password';

$_['error_daag'] = 'Password must be between 4 and 20 characters!';
I'm not sure why I'm getting these errors and how I can solve them. I hope someone can help me with this.

New member

Posts

Joined
Mon May 20, 2013 6:19 am

User avatar
Guru Member

Posts

Joined
Wed Nov 16, 2011 11:53 am
Location - Singapore
Who is online

Users browsing this forum: No registered users and 106 guests