Billing fields
-
Hi all
My customers are businesses so I need to add two fields: their company name and tax id to their billing details that will show in the invoice that is automatically created by PMPro and the confirmation email that is sent to the customer. Does anyone know how to add these fields, I am not a coder and have already stretched my budget with my developer but if I can either do it myself on the front end or tell the developer exactly what to do on the back end she may fix it.
Thanks guys
-
Hey @ahamaton,
Thank you for opening up a new thread.
You will need to install the Register Helper Add-on for PMPro, it’s a free add-on.
Here is a full code example as a starter template to work from, in which you can simply rename the fields to get both the company name and tax id from users – https://www.paidmembershipspro.com/add-ons/free-add-ons/pmpro-register-helper-add-checkout-and-profile-fields/code-examples/
Please let me know if this helps.
-
This reply was modified 9 years, 6 months ago by
Andrew Lima.
Legend, so do they need to do the above and what you said in the other thread “Hi @ahamaton,
Thank you for your patience.
I have reopened this thread.
You should be able to use the get_user_meta method to retrieve the custom fields that you’ve created on checkout for the client.
All custom fields are saved in the _usermeta table.
What you can do is simply get the $current_user metadata and display it using the same hook above.
I’m sure your developer should be able to do this.
Please let me know if there is any further questions :slightly_smiling_face:”
OK, I’ve spoke to the developer and she is familiar with the addon. She quoted for the add on and is now quoting me 5-6 hours to edit the addon you refer to above. Surely it shouldnt take long at all to do that. What are your thoughts ?
Hi @ahamaton,
It all depends with the developers experience. Since I work with PMPro on a daily basis, I could probably do it a lot quicker than 5-6 hours.
That’s correct, once the fields are setup you should be able to get the data from the
$current_userand get the custom field data using theget_user_metaalthough there are a couple of ways of doing this. 🙂I hope this helps.
Thanks again buddy, she’s looking at it for me now. Fingers crossed
The developer has fixed it so that the information from those fields shows in the confirmation / invoice email but it still doesnt show on the invoice page. Any thoughts?
Hi @ahamaton,
Unfortunately this is difficult to debug from this end of the channel as we would need to be logged into your site and debug the custom code which your developer has done.
I would suggest in following up with your developer to see if you they are able to resolve this issue for you.
My sincerest apologies.
Thanks Andrew
Unfortunately, she just keeps causing problems. I am using her because she’s cheap which we all know isnt always best. By the way, before she started all the fields in the checkout page were mandatory by default bar the second line of the address. After finishing they were optional. I asked her to make them mandatory again but she told me that was the default PMPro setting. I pulled a screenshot from the PMPro website showing the mandatory fields but she keeps sending me shots of coding as proof that it is not the default setting of PMPro. She has fixed it but is now implying she has done extra work for me. I know they were mandatory before she started. Can you confirm if the default setting is to make those fields mandatory as per the following screenshot
https://www.paidmembershipspro.com/features/screenshots/You’re welcome 🙂
Most fields on the membership checkout page are required by default and if your developer has set this up correctly this should not change.
To show the additional fields to the invoice you may use the following filter to add to the list at the top of the invoice – https://www.paidmembershipspro.com/hook/pmpro_invoice_bullets_top/
Here’s example code of where PMPro has used this before (but this displays at the bottom bullets) – https://github.com/strangerstudios/pmpro-donations/blob/master/pmpro-donations.php#L404
This should help your developer get on the right track 🙂
Thanks buddy
She’s a nightmare mate, she’s cost me more than she’s saved me. I’ve now found two of my pages arent working due to archiving she did so I’ve had to change the permalinks to get them to work. I can’t wait till she is done (assuming she finishes the job successfully) . Anyway, thanks again
OK, I hope you arent starting to hate me. This is a long shot as it might be to hard for you to answer without examing her coding but after the developer added the company name and tax id to the checkout page, she configured it so that the customers input was shown in invoice emails. (She has said she would have to do the relevant configuration to show it on the invoice page as a separate task). However, she has created another problem; now with email templates. The templates that include the company name and tax id are now no longer editable. What I mean is I can edit them; I can even send them from the server and the edited versions arrive in my inbox. However, if I test the checkout process the customer receives the unedited version of the email. I tried doing the same thing with the cancel template which is a template unaffected by her coding and the customer received the edited version. So this would seem to be an issue isolated to the templates affected by what she has done. I don’t suppose you have any ideas what might have caused this do you ?
Hi @ahamaton,
It’s no problem at all. Unfortunately you will have to follow up with your developer since there was extensive customizations done to PMPro and the default functionality has changed dramatically.
It is really difficult to debug without having a look at the code changes.
You will need to follow up with your developer and she will need to debug this issue for you since she customized it for you.
Yeah, no worries Andrew, I thought that would be the case.
Just a comment, it seems strange to me that PM Pro doesn’t have a plugin geared toward accommodating business customers. It seems to be geared more toward people subscriptions. Are you aware of a PMPro plugin or any plans to develop one. My concern is that you said this is siginificant customisation because it might cause issues with future PMPro updates ?
Cheers
AndrewThanks for the feedback, I will relay this to our development team. I think it’s a good idea, we may either have a plugin or a tutorial to add the relevant code.
I sincerely apologize about the inconvenience caused.
If customization is done correctly, you are able to keep PMPro updated to the latest version, that’s why I recommend using
hooksas much as possible over custom page templates.No problem, your always very supportive Andrew, thank you
-
This reply was modified 9 years, 6 months ago by
The topic ‘Billing fields’ is closed to new replies.