Jump to content

new field in checkout payment


Recommended Posts

Hello,
I am creating a new extension for Presta 8

I want to add a new field somewhere in checkout - payment. I've seen many posts, websites, etc. and couldn't find a working solution.

Basically, I want to use any hook - I don't know which one is the most suitable. I tried many hooks, but I didn't see any effect.


I expect to see any change, any effect in the checkout payment section. Then I want to get the data from this field into the actionValidateOrder hook

my code:

//mainExtensionFile.php

	$this->registerHook('displayPaymentTopForm');	


	...


public function hookDisplayPaymentTop($params)
	{
		return $this->display(__FILE__, '/views/templates/hook/display-payment-top.tpl');
	}



//views/templates/hook/display-payment-top.tpl
<div class="form-group">
    <label id="teeest" for="your_field_name">test</label>
    <input type="text" id="your_field_name" name="test" value="test">
</div>

 

Edited by Grzegorz Zych
missing letter (see edit history)
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...