Syntax

setReferringAffiliate( referrer_id, affiliate_id, commission=false )

Set the referring partner for an affiliate.

Access rights

full access required

Arguments

  • referrer_id - the partner bringing affiliates
  • affiliate_id - the affiliate possible referred by the partner
  • commission (optional) - the percentage of the affiliate commission, the vendor will pay to the referring partner. The affiliate comission is not changed by this.

Return Data

The data record of the referred affiliate.

[data] => Array
    (
        [action] => read|create|update|none
        [affiliate_id] => 12345
        [affiliate_name] => AnAffiliateBringingBuyers
        [referrer_id] => 54321
        [referrer_name] => APartnerBringingAffiliates
        [commission] => 20.00
        [created_at] => 2019-06-05 05:48:59
        [created_by] => 1
    )