[Skip to main content](#vessel-content)

#   Can't getVar

##

- **[foong](/forum/user/48691-foong "View foong's Profile")**
- [![foong's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/48691-foong "View foong's Profile") Topic Author
- [ Offline](/forum/user/48691-foong)

Less More

- Posts: 2
- Thank you received: 0
-
-

9 years 7 months ago -  9 years 7 months ago [\#265024](#265024) by [foong](/forum/user/48691-foong "View foong's Profile")  *[Can't getVar](/forum/29-payment-methods/889357-cant-getvar#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:  Thank you.")* was created by *[foong](/forum/user/48691-foong "View foong's Profile")*

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-&gt;custom_html ='&lt;label&gt;&lt;span&gt;Please select the bank which you want to pay with&lt;/span&gt;&lt;/label&gt; &lt;form id="form1" method="post"&gt; &lt;select name="channel" id="channel"&gt; &lt;option value="" selected="selected"&gt; &lt;/option&gt; &lt;option value="a"&gt;A&lt;/option&gt; &lt;option value="b"&gt;B&lt;/option&gt; &lt;option value="c"&gt;C&lt;/option&gt; &lt;/select&gt; '; $usable_methods[$method-&gt;ordering] = $method;

Thank you.

Last edit: 9 years 7 months ago by [foong](/forum/user/48691-foong "View foong's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy84ODkzNTctY2FudC1nZXR2YXI/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86286
- Thank you received: 14263
-
-

9 years 7 months ago [\#265027](#265027) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Can't getVar](/forum/29-payment-methods/889357-cant-getvar#265027 "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:  Thank you.")*

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](/forum/user/48691-foong "View foong's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy84ODkzNTctY2FudC1nZXR2YXI/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[foong](/forum/user/48691-foong "View foong's Profile")**
- [![foong's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/48691-foong "View foong's Profile") Topic Author
- [ Offline](/forum/user/48691-foong)

Less More

- Posts: 2
- Thank you received: 0
-
-

9 years 7 months ago [\#265236](#265236) by [foong](/forum/user/48691-foong "View foong's Profile")  Replied by *[foong](/forum/user/48691-foong "View foong's Profile")* on topic *[Can't getVar](/forum/29-payment-methods/889357-cant-getvar#265236 "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:  Thank you.")*

Thank you very much,it works like a charm

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy84ODkzNTctY2FudC1nZXR2YXI/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop- Install &amp; Update- Product &amp; Category Display- Content Creation- Sales and Orders- - Orders management- - Reports &amp; Statistics- Customers- Checkout- Payment Methods- Shipping Methods- Import &amp; Export (CSV, XLS…)- Specific Features- - Affilation- - Taxes- - Wishlist- - Vote- - Carousel &amp; Slider- - Mass Actions- - Filters &amp; Search- - Discount &amp; Coupon- - Feature Request- Integrations- Showcase- General Talk about HikaShop- Development- - HikaShop 3.0 Beta- Translation- Commercial Jobs HikaShop Components- HikaMarket- - Market: Feature requests- - Market: How to?- - Market: Bug Report- HikaSerial- - General talk about HikaSerial- - Serial: Bug Report- - Serial: How to?- - Support en Français de HikaSerial (French Support)- - HikaSubscription- HikaAuction- - Auction: Feature requests- - Auction: How to?- - Auction: Bug report Hikashop around the world- Support en Français (French Support)- Russian- - FAQ. Курс выживания с Hikashop. Частые вопросы и о- - Расширения Hikashop- - Наши сайты на Hikashop- 日本語版サポート(Japanese Support)- Thai- German Archives- Bug Report- How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.264 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
