Can't getVar

  • Posts: 2
  • Thank you received: 0
7 years 8 months ago #265024

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:

  $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: 7 years 8 months ago by foong.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
7 years 8 months ago #265027

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.

  • Posts: 2
  • Thank you received: 0
7 years 8 months ago #265236

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.055 seconds
Powered by Kunena Forum