Jump to content

Custom page linked to a product purchased by a user

Recommended Posts

Hi 🙂

I need help for custom page 😞 I am sorry. I am French and it will not be easy to understand xD

1) I use WHMCS for server rental. And in this case, I would like to create a usage panel for users related to their purchased product.
2) I saw that each product was identified by an ID in the link (ex : ?action=productdetails&id=2)
3) I have already managed to create a basic custom page only for logged in members (/panel.php)
4) Each product on the customer area will be a server on our Proxmox platform
5) I want, on my "/panel.php" page, users can interact with our homemade API but "linked" to their product (style /panel.php?action=productdetails&id=2

**Ex : **
User1 have 2 products on their customer area (prod1 and prod2)
User2 have 1 product on their customer area (Prod3)

I want User1 to have his panel for his prod1 and a panel for his prod2
User2 has his panel for his prod3.
But user 2 must not have access to prod1 or prod2

Share this post

Link to post
Share on other sites

Why are you using a custom page instead of the server module's clientarea function to provide that information?   If you do not have access to the server module's code, then using an ClientAreaProductDetailsOutput hook would be your next best option .  That hook will provide the service ID as well as should prevent users from accessing other users services without duplicating that functionality in the custom page.  You then return HTML for any additional output you may want.  This works with any server module and using javascript you can move the output to any where on the page that is needed. 


Share this post

Link to post
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.

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