Jump to content

jamiec

Senior Member
  • Content count

    3
  • Joined

  • Last visited

Community Reputation

0 Neutral

About jamiec

  • Rank
    Junior Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Any ideas anyone? @Kian Can yo usee why this would be failiing? M
  2. Hi: @Kian need a bit if assistance! Trying to get my "Checkout" to include "Affiliate Code" so affliates don't have to have to point to me from a website, and they can do it by "word or mouth" (or word of text!).. to place orders and have them get credited. I used your code proposed on a previous posting by you, but I was not successful. WHMCS stated that it does show the hook activating, but stated that the "redirection code" is not working as expected. Please find following the code, to see if you could take a quick look and provide some input. It woiuld be greatly appreciated. Jamie <?php use WHMCS\Cookie; use WHMCS\Database\Capsule; // function somePrefix_ClientAdd($vars) // This above command link says to chage "somePrefix_ClientAdd" so something else, so I am changing to "liquid_ClientAdd" // function liquid_ClientAdd($vars) { // Configuration $affiliationFieldID = 332; // ID of Client Custom Field for Affiliation Code $partners['278'] = 'LIQUID'; // Affiliation code of partner/client ID 278 (this is mike test) // REM'd to hide other affiliate id's (until end of the rem) // $partners['40'] = 'DOG'; // Affiliation code of partner/client ID 40 // $partners['41'] = 'YEP'; // Affiliation code of partner/client ID 41 // $partners['42'] = 'SAD'; // Affiliation code of partner/client ID 42 // // // Do not edit below this line if (in_array($vars['customfields'][$affiliationFieldID], $partners)) { $affID = Capsule::table('tblaffiliates')->where('clientid', array_search($vars['customfields'][$affiliationFieldID], $partners))->first(['id']); header('Location: *?aff=' . $affID->id . '&gocart=true'); die(); } } // changing add_hook('ClientAdd', 1, 'somePrefix_ClientAdd'); below with "liquid_ClientAdd" // add_hook('ClientAdd', 1, 'liquid_ClientAdd');
  3. Hi: Have system with WHMCS for a few years now, but want to expand my affiliates' abiliy to refer customers to me. I would like to have an "add affiliate code" in the order form. I have followed Kian's directions from his post: Kian wrote the directions https://whmcs.community/topic/290554-using-affiliate-system-with-referral-codes-not-cookies/?tab=comments#comment-1303042 but I seem to be hung up somewhere.. I'm pretty sure I did the setup and php file ok. it shows on the order form, but when processed, it still says "no affiliate", and nothign in affiliate page. I did not want to message Kian directly (not sure if that is OK on the rules). Not sure If I should attach the Php file here either, but can PM it if needed. Is there a place/way to loot at a log to see if the php file was even called/triggered?? I could find no place in the post where it said how to "attach" that hook to anything. Thanks in advance, Jamie
  4. Welcome to WHMCS.Community jamiec! We're glad you're here please take some time to familiarise yourself with the Community Rules & Guidelines and take a moment to introduce yourself to other WHMCS.Community members in the Introduce Yourself Board.

×

Important Information

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