Jump to content

Recommended Posts

hi,

i want to know if there is any process or any way to create a Promotion and assign it to specific Affiliate

i have generated a promo promocode=TestPromo

and i have an affiliate as ?aff=10

Now i want to assign all the user/clients who uses that promo to be assigned to the Affiliate and gets the specified commision.

help required immediately please.

thanks

Share this post


Link to post
Share on other sites

Pseudo-code: On InvoicePaid if TestPromo coupon has been used and the invoice is linked to a new order...

INSERT INTO tblaffiliatesaccounts (affiliateid, relid) VALUES ({$AFFID}, {$RELID})

Where {$AFFID} in your example is 10 (the ID of the Affiliate) and {$RELID} is the ID of the order (tblorders.id).

Share this post


Link to post
Share on other sites

thanks @Kian

but what if i dont know the affID.

my use case is this:

i want to make a PromoCode for each affiliate.

NOW new Client subscribes to my service using that promoCode and i want to give the commission of this client to that affiliate. so how will the affiliate gets this commission.

i dont want to use the affiliate link. i want to use promo codes for affiliate. any suggestions?

19 hours ago, Kian said:

Pseudo-code: On InvoicePaid if TestPromo coupon has been used and the invoice is linked to a new order...


INSERT INTO tblaffiliatesaccounts (affiliateid, relid) VALUES ({$AFFID}, {$RELID})

Where {$AFFID} in your example is 10 (the ID of the Affiliate) and {$RELID} is the ID of the order (tblorders.id).

 

Share this post


Link to post
Share on other sites

On AffiliateActivation create the coupon code...

INSERT INTO tblpromotions (code, [...etc...]) VALUES ({$COUPON}, [...etc...])

{$COUPON} should contain the ID of the affiliate in some ways (eg. Affiliate ID is 24 - Coupon code is 24AAABBB). This way you can determine the what is the right coupon to use for each affiliate by simply looking at digits. Alternatively if you don't want to store the ID in the code you'll need to create a separate table that stores the connection between 24 and AAABBB.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Similar Content

    • By HarryAdney
      Hi guys,
      Quick question, when testing out an affiliate link the page redirects straight to my home page, i.e. clicking on https://domain.com/*?aff=1 redirects straight to https://domain.com. Is this correct?
      Cheers,
       
      Martin
    • By WGS
      Get flat 30% OFF on ClientX WHMCS Client Area Theme. Use Coupon Code - X30

       

       

       
       


    • By WGS
      We have released a more stable and feature-rich version 2.1.0 of the HostX WHMCS Theme. V 2.1.0 is now more stable and responsive than the previous versions.
      We have not left any stone unturned in this version, want to know what's new in this version?
      New Features
      3 New Variations Introduced New Mobile Menu Introduced Mobile Menu Domain Search Introduced 7 New Blocks Added New Banner Images Introduced Fully Responsive DNS Management, Get Epp Code, Manage Contact, Email Forwarding and Private Name Server options added in Client Area. Product detail page add a button for Cpanel login, webmail login, cancel service, etc Overall UI Enhancements SEO Manager and OG Tags now supports Multiple Language Top Menu now supports Multiple Language Improvements & Bugs Fixes
      Responsive Improvements UI/UX Improvements Add Funds Issues Fixed TLDs Showcase pricing issue fixed VPS Page Checks has been fixed Stability of the theme has been enhanced Security of the theme has been enhanced  
      New Versions Overview
             
       
      View More
    • By Syed Ans Shah
      hi everyone,
      i am getting error while creating/adding new clients.
      WHMCS says "Module Create Failed - Service ID: 1440 - Error: Error :" when automatically accepting an order.
      i get two records in tblorders in my whmcs database as well.

      same order with userid 1340
       
      The actual account is created in server and whmcs but also duplicate order remains pending in WHMCS.
      WHMCS client Profile logs are:

       
      i have also added the update domainstatus to Active as it was creating the service before while CreateAccount;
      now it does create the account in server but again duplicate order is still there

       
       
      I'd appreciate your thoughts to help me resolve this issue please.
       
  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

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