RSForm and Affiliate Tracker API

dadillon
dadillon
Offline
0
Hope you can point me in the right direction.

How would I insert an RSForm field value into the 'name' or 'Extended Namefield' of the API?


Thanks,
Doug
Responses (3)
  • Accepted Answer

    Monday, August 26 2019, 07:40 AM - #Permalink
    0
    well that depends on where you're placing the API code... You need to somehow grab that value you want to insert, and insert it in 'name' position.
    The reply is currently minimized Show
  • Accepted Answer

    dadillon
    dadillon
    Offline
    Monday, August 26 2019, 08:56 AM - #Permalink
    0
    Hi Germinal!

    Thank you for the reply!

    I am placing the API code in the "Script called on form process" section of RSForms. I believe this code block is run when the user hits the submit button on the form. My testing thus far seems to prove this true.

    I am not a programmer and so I don't know the correct syntax to place the html input field "affiliate_test" into the php array of the API. I have tried replacing "Custom Order" with affiliate_test and with $affiliate_test and about 100 variations. I just don't know how to make "Customer Order" = the value of the data entered into the form field affiate_test. Sorry for my ignorance.

    $conversion_data = array(
    "name" => "Custom Order",
    "component" => "com_yourcomponent",
    "extended_name" => "The item name",
    "type" => 1,
    "value" => 100 ,
    "reference_id" => 234,
    "approved" => 1,
    );

    require_once(JPATH_SITE.DIRECTORY_SEPARATOR.'components'.DIRECTORY_SEPARATOR.'com_affiliatetracker'.DIRECTORY_SEPARATOR.'helpers'.DIRECTORY_SEPARATOR.'helpers.php');
    AffiliateHelper::create_conversion($conversion_data, $user_id);
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, August 27 2019, 10:23 AM - #Permalink
    0
    I understand,

    the thing is I don't know how RSForms is passing that information in, so, to see how it stores that info and how to gather it and pass it to the API, I need to look into the code and do some tests myself. I don't think it will take much, but this is separated "custom code"
    The reply is currently minimized Show
Your Reply