Author Topic: Payment method plugin with user input field  (Read 272 times)

vmfyelloq19

  • Beginner
  • *
  • Posts: 9
  • A beginner
Payment method plugin with user input field
« on: August 13, 2019, 11:46:57 am »
Hi folks,

I need to have a user input field for a payment method, baisally a text input filed that's presented when the payment method is selected.
( ) paypal
() other 1
(x) my payment method
     Please enter code [___________]

Any hints?

TIA!

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9046
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.4.2
Re: Payment method plugin with user input field
« Reply #1 on: August 13, 2019, 16:17:25 pm »
you can over ride the protected function getPluginHtml () and provide a field but I assume there is a lot more to it than that.. what is the field supposed to do?
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

vmfyelloq19

  • Beginner
  • *
  • Posts: 9
  • A beginner
Re: Payment method plugin with user input field
« Reply #2 on: August 13, 2019, 18:53:51 pm »
Hi GJC Web Design,

thank your for your reply.
This particular "payment method" just needs to pass a string with the customer's account number along with the order.
A shopper field would be fit the case better, as it would be stored into the customer's profile, but shopper fields are not be conditional for the specify payment method.

Cheers!

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9046
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.4.2
Re: Payment method plugin with user input field
« Reply #3 on: August 13, 2019, 23:18:17 pm »
in that case u could use some JS to show/hide and enforce the shopper field if that radio is chosen
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

vmfyelloq19

  • Beginner
  • *
  • Posts: 9
  • A beginner
Re: Payment method plugin with user input field
« Reply #4 on: August 14, 2019, 08:49:59 am »
I never use Javascript for required functionality, as it is possibly disabled.

Cheers!

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 27502
  • Always on vacation
    • Jenkin Hill Internet
Re: Payment method plugin with user input field
« Reply #5 on: August 14, 2019, 11:29:17 am »
I never use Javascript for required functionality, as it is possibly disabled.

As VirtueMart makes heavy use of JavaScript then AFAIK someone with js "disabled" would be unable to use the store, anyway.
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Currently using VM 3.6.1.10121 on Joomla 3.9.11 PHP 7.0.33
Testing 3.6.1.10129 on Joomla 3.9.11