Jump to content

Add Data After Product Purchase for Client Interface


bitsbc

Recommended Posts

Hi All, I've got a product I'm selling that currently requires manual input into another system. I collect data and payment in WHMCS then take the user information and input into another system. The other system will provide me with a username and password that I would like accessible to the user in their Client Area.

See below:

image.png.ee43a6586701e5780f199aefbba9f8c8.png

 

After the user clicks on their service, I would like to add  "Username & Password" in here after the order has been Accepted/Completed. Is there a way I can add additional fields that are NOT on the order form, and only added AFTER the purchase from the admin interface? 

Link to comment
Share on other sites

There are ways to do.  I would suggest you can try to have the hooks method first, which is much easier.

Assumed your product is categorized as non domain products, then should use this hook:
https://developers.whmcs.com/hooks-reference/client-area-interface/#clientareapageproductdetails

After then, modify the template file (clientareaproductdetails.tpl) to add the new fields you wish to add. 

Hope these help.

Link to comment
Share on other sites

If the product you selling is having its own module, you can always perform a module name check first.

I would suggest you can try to check what's in the $vars.  You can use logModuleCall to print the contents in $vars to Module Log.

If no, I would guess you will store the credential info in custom fields.  If so, you can perform a check if these fields are not empty then only show the fields and its content.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated