Add a field for Paypal Address

  • Posts: 7
  • Thank you received: 0
12 years 11 months ago #37568

Is it possible to add a text field during check out so that a user can enter their Paypal email address?
Right now, it just shows Paypal as a payment option, but then after a a customer checks out the order is charged to whatever email they have on file for the joomla community (which is usually not linked to their Paypal).

So I guess two questions:

1. Can I add a field during checkout for users to give me their Paypal email address?

2. Can I make their Paypal email address override their regular email they have registered on the community so that the Paypal invoice/request gets sent to their Paypal address??

Thank you!!

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

  • Posts: 83103
  • Thank you received: 13415
  • MODERATOR
12 years 11 months ago #37693

Hi,

1. Yes, you can create a custom field for that via the menu Display->Custom fields.

2. That's possible of you edit the paypal plugin code to use that custom field information instead of the normal user email. But that requires some knowledge in PHP.

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

  • Posts: 7
  • Thank you received: 0
12 years 11 months ago #37736

Thanks for the quick reply!

Added the custom field.
For the plugin would I just need to edit paypal.php where it says $vars["email"]=$user->user_email; and replace it with the custom field email?

Last edit: 12 years 11 months ago by kurisuti.

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

  • Posts: 83103
  • Thank you received: 13415
  • MODERATOR
12 years 11 months ago #37824

Yes, that's it.
If you added a custom field of the table "address", it should be in $order->cart->$address_type->CUSTOM_FIELD_COLUMN_NAME

The following user(s) said Thank You: kurisuti

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

  • Posts: 7
  • Thank you received: 0
12 years 11 months ago #38083

So I would change

$vars["email"]=$user->user_mail;

to

$vars["email"]=$user->customfieldtitle;


Correct?

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

  • Posts: 83103
  • Thank you received: 13415
  • MODERATOR
12 years 11 months ago #38177

If you created a custom field of the table "user", then yes.
If it's a custom field of the table "address", then no, it would be:
$vars["email"]= $order->cart->$address_type->CUSTOM_FIELD_COLUMN_NAME;

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

Time to create page: 0.064 seconds
Powered by Kunena Forum