User fields based on payment method...

  • Posts: 151
  • Thank you received: 9
11 years 5 months ago #104836

Hello,

We deliver only digital downloads. Therefore we ONLY ask for people's name and e-mail address. This works perfect.
When someone pays, he is redirected to the payment provider page where he can log in and pay. After payment he returns to the shop's thank you page.

Now we are going to implement a new payment method that requires more information from the customer.

Is it possible to show additional user fields based on the chosen payment method?

Kind regards,
Maurice

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

  • Posts: 26151
  • Thank you received: 4027
  • MODERATOR
11 years 5 months ago #104855

Hi,

The payment plugin can have some custom HTML which will be displayed just under the selection, like payment plugins which ask for the credit card information.
So, in the function "onPaymentDisplay" of the payment plugin, you have to put some code like

// Set some custom html for the plugin.
$method->custom_html = '<div>My custom html</div>';

// Insert the method in the available plugins (code which is near the end of the onPaymentDisplay function)
$usable_methods[$method->ordering] = $method;
If you set some inputs, you will be able to read them in the function "onAfterOrderConfirm", using a JRequest::getVar().

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

Time to create page: 0.054 seconds
Powered by Kunena Forum