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


Comments

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

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

      1. 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

        1. 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

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

  2. 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.

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

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

  3. 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.

    1. 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

  4. 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.

    1. 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!

  5. 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

Share