Display and use “Affiliate Registration Form” fields

Summary:
Display and use “Affiliate Registration Form” fields
by “Field Name” e.g. “Distributor ID” in
+ woocommerce emails A)
+ woocommerce checkout page b)
+ through affiliates short codes in WP pages C)
+ the Affiliates “Administrator notifications” email D)
+ Direct User data E)

Please make it possible.

A) display Affiliate Registration Form fields to visitors in woocommerce emails
HI i did not get this working:

the “distributor ID” comes from the affiliates registration form field:
“aff_distributor-id” = Field Name and i wanted to show it to the visitors trough the code in woocommerce emails. how is it possible?


B) display Affiliate Registration Form fields to visitors on checkout
HI i did not get this working:
You can add to your theme functions.php file this code:

add_action('woocommerce_after_checkout_billing_form', 'my_woocommerce_after_checkout_billing_form');
function my_woocommerce_after_checkout_billing_form () {
echo 'Distributor ID: ' . do_shortcode( '[aff_referrer_info show_name="" /]' );
}

the “distributor ID” comes from the affiliates registration form field:
“aff_distributor-id” = Field Name and i wanted to show it to the visitors trough the code in woocommerce emails. how is it possible?

C) HI i did not get this working:
[affiliates_referrer_user direct=”true” display=”display_name”/]
[affiliates_referrer_user direct=”true” display=”display_name”]
[affiliates_referrer_user direct=”true” display=”aff_address”]

i also added a field “aff_address” = Field Name to the affiliates registration form
and i wanted to show it to the visitors trough the code above.
how is it possible? see my try under the banner https://www.santegra-international.com/affiliate-area/#tab-id-3

D) I wanted to insert the “distributor ID” field inside the Affiliates “Administrator notifications” email
How to do this?

E) Assign “Affiliate Registration Form” fields
by “Field Name” e.g. “Distributor ID” to “Direct” Affiliate User data

Thanks for make it possible.

best regards

Tobias

13 Responses to Display and use “Affiliate Registration Form” fields

  1. Tobias March 25, 2015 at 10:02 am #

    can you provide an example for this entry:
    http://docs.itthinx.com/document/affiliates-enterprise/shortcodes/basic-shortcodes/referrer_user/

    • antonio March 30, 2015 at 7:57 am #

      [referrer_user direct="true" display="user_login"]

      • Tobias March 30, 2015 at 8:42 am #

        A) please clear the logic to me: Both shortcodes only viewing the Username “Tobias_Conrad”
        but should view the login fields and the content of the registration field “aff_distributor_id”.

        [affiliates_is_not_affiliate]

        login: [referrer_user direct="true" display="user_login"]

        -> ID 2015.03.30: [referrer_user direct="true" display="display_aff_distributor_id"]

        [/affiliates_is_not_affiliate]

        see here: https://www.santegra-international.com/affiliate-area/#tab-id-3

        B) please clear up how to call the referred affiliate extra/custom fields data

        • antonio March 30, 2015 at 8:56 am #

          Hi Tobias,
          ‘display’ attribute in [referrer_user] shortcode only can have “user_login“, “user_nicename“, “user_email“, “user_url“, “display_name“ as values.
          If you have ‘display_aff_distributor_id’ as user meta, then you could use ‘extended_referrer_user’ shortcode ( [extended_referrer_user fields=”display_aff_distributor_id”] )
          Regards

  2. Tobias March 25, 2015 at 10:01 am #

    or can i set a affiliate to “DIRECT AFFILIATE”?

  3. Tobias March 25, 2015 at 9:32 am #

    show also registration fields on DIRECT AFFILIATE

    This is essential for me and could only maybe developed by you.

    distributor ID field is missing on DIRECT AFFILIATE
    http://awesomescreenshot.com/02c4phgc6c
    I need the Distributor ID field there.

    • Tobias March 28, 2015 at 4:08 pm #

      or can i set a affiliate to “DIRECT AFFILIATE”?
      this would be the easiest solution also for my developer.

      • antonio March 30, 2015 at 7:55 am #

        You can try to assign an username to ‘Direct’ affiliate in Affiliates->Manager Affiliates.
        Regards

  4. Tobias March 24, 2015 at 2:26 pm #

    please invest more timea and give examples, i am not a developer!!

    not working:
    field name on registration: aff_distributor_id is not sown via shortcode

    added in functions.php

    add_shortcode( ‘extended_referrer_user’, ‘my_extended_referrer_user’ );
    function my_extended_referrer_user ( $atts, $content = null ) {
    $atts = shortcode_atts(
    array(
    ‘fields’ => ‘aff_distributor_id’
    ),
    $atts
    );
    $fields = null;
    if ( !empty( $atts[‘fields’] ) ) {
    $fields = array_map( ‘strtolower’, array_map( ‘trim’, explode( ‘,’, $atts[‘fields’] ) ) );
    }
    if ( $fields ) {
    require_once AFFILIATES_CORE_LIB . ‘/class-affiliates-service.php’;
    $affiliate_id = Affiliates_Service::get_referrer_id();
    if ( $affiliate_id ) {
    $user_id = affiliates_get_affiliate_user( $affiliate_id );
    if ( ( $affiliate_id !== affiliates_get_direct_id() ) ) {
    if ( $user_id ) {
    foreach ( $fields as $field ) {
    echo get_user_meta($user_id, $field, true) . ‘
    ‘;
    }
    }
    }
    }
    }
    }

    added on page https://www.santegra-international.com/test-2/
    [affiliates_referrer_user direct=”true” display=”display_aff_distributor_id”/]

    distributor ID field is missing on DIRECT AFFILIATE
    http://awesomescreenshot.com/02c4phgc6c
    I need the Distributor ID field there.

    normal account show the field
    http://awesomescreenshot.com/0bf4phekf3

    Point A) is not clear also.
    does this work?

    Please help clearly.

    • kento March 24, 2015 at 7:31 pm #

      Hi Tobias,

      For modifications or customizations like that you should seek the help of a PHP developer. We are here to help you with any issues that you might experience but we’re not here to do free custom development for you. You have already indicated that you would be using the help of a freelancer for this customization and I would recommend this strongly for your case, it is going to be the fastest and most efficient way. Please understand that support means help with issues that you experience, help with usage questions and to clarify doubts that you have with the plugins themselves. By no means does support include custom development which is what you are asking us to do. I hope you understand, we’re happy to help if you need guidance on your requirements.

      Cheers

  5. Tobias March 18, 2015 at 7:01 am #

    ok. if i transfer you 80€ via paypal.
    can you then please share me the codes for each point?
    Otherwise i have to make a quote on freelancer.com
    i would like you to have the money.

    • antonio March 18, 2015 at 8:33 am #

      Hi,
      Sorry small hacks, modifications, low or under-budgeted projects are not accepted.
      I have created an extended_referrer_user shortcode to show the referrer’s meta data.
      Thanks!

  6. antonio March 17, 2015 at 8:54 pm #

    Hi Tobias,
    Affiliates registration form fields are stored as user meta data.
    You can use this code for woocommerce checkout, and as reference to another questions:
    add_action('woocommerce_after_checkout_billing_form', 'my_woocommerce_after_checkout_billing_form');
    function my_woocommerce_after_checkout_billing_form () {
    require_once AFFILIATES_CORE_LIB . '/class-affiliates-service.php';
    $affiliate_id = Affiliates_Service::get_referrer_id();
    if ( $affiliate_id ) {
    $user_id = affiliates_get_affiliate_user( $affiliate_id );
    if ( ( $affiliate_id !== affiliates_get_direct_id() ) ) {
    if ( $user_id ) {
    echo 'Distributor ID: ' . get_user_meta($user_id, 'aff_distributor-id', true);
    }
    }
    }
    }

    cheers

We use cookies to optimize your experience on our site and assume you're OK with that if you stay.
OK, hide this message.

Affiliates · Contact · Jobs · Terms & Conditions · Privacy Policy · Documentation · Downloads · Useful Plugins · My Account

Share