Skip to main content

Can't getVar

More
9 years 6 months ago - 9 years 6 months ago #265024 by foong
Can't getVar was created by foong
Instead of error, I can't retrieve the user input by using JRequest::getVar in the onAfterOrderConfirm function. I have the form inside the
function of onPaymentDisplay:
Code:
$method->custom_html ='<label><span>Please select the bank which you want to pay with</span></label> <form id="form1" method="post"> <select name="channel" id="channel"> <option value="" selected="selected"> </option> <option value="a">A</option> <option value="b">B</option> <option value="c">C</option> </select> '; $usable_methods[$method->ordering] = $method;
Thank you.
Last edit: 9 years 6 months ago by foong.

Please Log in or Create an account to join the conversation.

More
9 years 6 months ago #265027 by nicolas
Replied by nicolas on topic Can't getVar
Hi,

You need to implement the function onPaymentSave and put your JRequest::getVar there.

I would recommend to look at the plugin "Purchase Order" in plugins/hikashoppayment/purchaseorder/
It does the same as you want but with an input instead of a select.
So adapting its code in your plugin should be easy.
The following user(s) said Thank You: foong

Please Log in or Create an account to join the conversation.

More
9 years 6 months ago #265236 by foong
Replied by foong on topic Can't getVar
Thank you very much,it works like a charm

Please Log in or Create an account to join the conversation.

Time to create page: 0.156 seconds
Powered by Kunena Forum