Jump to content

[SOLVED] Adding an input field to quick-order from (where get the value).


Recommended Posts

I want to add a custom input field to the form where the customers confirm their order. I'm struggling with where to read the value of this field. 


This is what I did:


In order-carrier.tpl I added this:

<p>{l s='TEST'}</p>
<p><input type="text" name="my_test"></p>

And so far no problem. It shows perfectly and the customer can give the input.


But now.... I have to retrieve the input. I suppose I have to use:

$my_test = Tools::getValue('my_test');

Also tried:

$my_test = $_POST['my_test'];

I tried to place this in several files. But it looks like I cannot find the right place to do this (or I'm overseeing something else). I tried:

  • modules\bankwire\controllers\front\validation.php
  • OrderController.php
  • OrderConfirmationController.php
  • OrderOpcController.php
  • bankwire.php
  • ParentOrderController.php

I thought the last one would be the best, since logging shows me that it's the first (processed) in line. 


EDIT: I thought the first location (validation.php - function postProcess) would be the best, since logging shows me that it's the first (processed) in line. 


Unfortunately until now I cannot read the value of the input. 


Of course I would appreciate very much finding someone who's able to give me the hint which will get me out of this headache  :-)





Edited by vekia (see edit history)
Link to comment
Share on other sites

Okay... that's how things go. More than a day struggling. Then posting the question. And now finding out myself. A stupid mistake: the input field was in between form-tags, but not in between the correct form-tags.


SOLVED !!!   (even though I don't know how to change that in the topic header.

Link to comment
Share on other sites

thank you for confirmation that it is solved.

here are instructions about marking topics as solved:



[sOLVED] Topic
If, after posting a topic, you find a solution to your problem, please indicate it in your post and describe the solution.
Furthermore if you are the author of the topic for which a solution has been found, please edit your topic title to mark it as [sOLVED].

To mark a topic as [solved] :
- Edit the first post of your topic by clicking on the "Edit" button,
- Click on the "Use full editor" button,
- Add the "[solved]" string at the beginning of your topic title and click on the "Submit Modified Post" button.
  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...