Post by Alexisander » Mon Feb 25, 2013 8:53 pm

Hello all!

I need to create a text field, input text field, in the the order checkout section, at the payment method.

The .TPL is here: catalog/view/theme/default/template/checkout/payment_method.tpl

It is a field where the customer must insert a private data. And only if he writes more than 3 characters and less than 255, he can continue with the checkout.


Anyone knows how to do that? I have tryed to make some things that i have seen in other sections of the website but it is giving me errors.

THANK YOU!

Active Member

Posts

Joined
Mon Jul 18, 2011 10:11 pm

Post by Alexisander » Mon Feb 25, 2013 10:05 pm

i have made this to validate in the public validate function in the payment_method.php in catalog controller

if (utf8_strlen($this->request->post['input1pf']) < 1) {
$this->error['text'] = $this->language->get('error_text');
}

}

but i get errors

SyntaxError: JSON.parse: unexpected character

OK

<b>Notice</b>: Undefined index: input1pf in <b>/home/netvoltr/public_html/syscreek/catalog/controller/checkout/payment_method.php</b> on line <b>226</b><b>Notice</b>: Indirect modification of overloaded property ControllerCheckoutPaymentMethod::$error has no effect in <b>/home/netvoltr/public_html/syscreek/catalog/controller/checkout/payment_method.php</b> on line <b>227</b>[]


Can someone tell me from 0 how to create a required text field in the checkout order payment_method? thx.

I can do it in other sections, but here e see that i cannot.

Active Member

Posts

Joined
Mon Jul 18, 2011 10:11 pm
Who is online

Users browsing this forum: No registered users and 32 guests