Post by becreative » Wed Jan 22, 2014 6:54 pm

Hello,

I would like to create new field in one step - Payment Method and I have a problem with get "$data['newfield']" in model.
When I fill that newfield in step 4 and click Continue to step 5 - I get a Notice: Undefined index: newfield in vqmod\vqcache\vq2-catalog_model_checkout_order.php on line 4
And after that, this field in database was empty.

If I maunally set a static value in model fo newfield - everything add to my database without any problem.

Already Have:

model/checkout/order.php

Code: Select all

newfield = '" . $this->db->escape($data['newfield']) . "'
controller/checkout/payment_method.php

Code: Select all

$this->data['entry_newfield'] = $this->language->get('entry_newfield');
	
		if (isset($this->request->post['newfield'])) {
			$this->data['newfield'] = $this->request->post['newfield'];
		} else {
			$this->data['newfield'] = '';
		}
template/checkout/payment_method.tpl

Code: Select all

         <tr>
          <td><?php echo $entry_newfield; ?></td>
          <td><input type="text" name="newfield" value="<?php echo $newfield; ?>" /></td>
        </tr>
       <tr>
And related Language files of course.

What I doing wrong ? I must create some Session_variable or something to achieve this ?
Really apprecitate for any clue.

Greetings!

Newbie

Posts

Joined
Fri Jan 10, 2014 9:21 pm

Post by becreative » Thu Jan 23, 2014 4:05 pm

Problem solved.

Newbie

Posts

Joined
Fri Jan 10, 2014 9:21 pm
Who is online

Users browsing this forum: Semrush [Bot] and 108 guests