Jump to content

How to add searchable DB interface as a product


blrdan

Recommended Posts

Hello I am I newbie to WHMCS, hopefully someone can point me in the correct direction.

 

I want to sell an informational product via WMCS on a subscription basis. After a customer has paid, the customer should be granted access to an interface which allows them to search the information which I am selling them.

 

I have the information stored in a mysql DB, and I plan to write the search interface in PHP however I'm not sure how to tie this into the post-purchase process and how to grant access only to paid users.

 

In addition I envision different products allowing access to different information, so Id need a know which product someone paid for and display the appropriate data.

 

I suspect this will involve templates & hooks but I'm not really sure where to start. Any guidance and/or example code would be greatly appreciated!

 

Thanks,

Dan

Link to comment
Share on other sites

It's not so complicated and you have several options. For example create a client group named "You can search" then run the ShoppingCartCheckoutCompletePage hook to add the user to that group. Finally do something like this for your script:

 

if($clientgroup=="You can search")
{
    // your script goes here
}

 

If your script is not based on WHMCS you could make it with licensing addon. When the user pays he gets a license key and now he can use your queries. Well as i said there are multiple ways... even with a custom module.

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