Jump to content

Convert imported cPanel product renewal into order for affiliate association


Recommended Posts

Hi,

I imported all of my customers via the cPanel import into WHMCS. I also have an affiliate to which I want to associate all their clients' products, in order for the affiliate to earn automatic recurring commissions on their clients' products.

I got the "AffiliateTools" WHMCS addon from Utixo, for a more robust affiliate system. Now a couple of my affiliate's clients have paid for their hosting product. The problem is that the affiliate didn't automatically receive a commission on the products. I think this is because the imported products are not actually labeled as orders in the WHMCS system.

Is there a way that I can convert the imported products into actual orders in WHMCS, so that I can then associate those orders to the affiliate?

I've also asked the support department of the "AffiliateTools" WHMCS addon from Utixo about this as well.

Link to comment
Share on other sites

I can confirm this is the case, for services that are not related to an existing parent order WHMCS provides no UI or API tools for assigning them to an affiliate.

Ideally there should be a way to assign orphan services to new specifically created orders, and those orders could then be assigned to an affiliate, following the intended WHMCS flow.
However, WHMCS has no tools for manually assigning services to orders either, nor an API method for creating a new order with existing services.
As a last resort it could be solved by editing the DB directly and linking those services to an existing order from the same client, by setting the orderid field in the tblhosting table, keep in mind though that doing so will potentially create inconsistencies in the DB.

 

As a sidenote, despite not providing tools for it, WHMCS could potentially assign services to affiliates regardless of them having a parent order entity: the DB structure for WHMCS relies on Service IDs in the tblaffiliatesaccounts table rather than Order IDs, but the UI and general workflow rely on orders, making for a confusing management for both developers and admins.

We are considering forcing this orphan service => affiliate relation in our AffiliateTools module, but ideally we would like to see some improvements on WHMCS's data structure for the affiliate system first, defining a clearer workflow and reducing risk of inconsistent behaviour.

 

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