affiliate by username not working

Hi,
I installed the Affiliates by Username plugin and added a new user, but the affiliate link still displays the affiliate ID and not the username in the affiliate account. Is there a setting in the Affiliate Pro plugin that I need to turn on for this to work?

7 Responses to affiliate by username not working

  1. Edk August 17, 2022 at 1:10 pm #

    Hi Eugene,

    I have been able to add the shortcodes to my affiliate page, and the username is showing, but I have customized the look and feel of the content on the “overview-pro.php” page, and the shortcodes place the link with the username at the bottom of the page where I don’t want it.

    How do I customize this code section to show the username and not the affiliate ID?
    I would also like the affiliate to get a page link with their username rather than the affiliate ID.
    ————–

    <input class="affiliates-generate-url" id="overview-pro-generate-url" type="text" placeholder="” value=”” name=”generate-aff-url” >

    ——

    Cheers,Ed

    • Eugen Bleck August 18, 2022 at 4:37 pm #

      Hi there Ed,

      Good afternoon. I trust you are well and safe!

      One way to go about it would be to override the overview-pro.php template file and add the following code where you would love it rendered in order to render the affiliate link with the username.

      if ( defined('AFFILIATES_BY_USERNAME_VERSION' ) ) {
      echo do_shortcode('[affiliates_by_username][affiliates_affiliate_link][/affiliates_by_username]');
      }

      You can customize it by copying the original content in the overview-pro.php template into the appropriate subfolder of your theme: mytheme/affiliates/dashboard/overview-pro.php

      It is highly recommended to use a child theme for such customizations. Child themes are suitable to keep things up-to-date when the parent theme is updated, while any customizations in the child theme are kept.

      STAY SAFE and be awesome!
      Best,
      Eugen.

      • Edk August 19, 2022 at 1:58 am #

        Hi Eugene,
        Thanks for the feedback – I was able to make the change, but I want the affiliates to be able to generate a link with their username rather than the affiliate ID.

        How would you modify the line below in the text area to return a link with the username
        when a website link is pasted in the input text area.


        echo esc_html( Affiliates_Shortcodes::affiliates_url( array() ) );
        —-

        Cheers,
        Ed

        • Eugen Bleck August 23, 2022 at 1:39 pm #

          Hi there Ed,

          Good afternoon. I trust you are well and safe!

          Please pardon the late reply on this. It turns out my colleague created a version of the overview-pro.php template which does exactly this. Here’s the copy of the overview-pro.php template.

          * Link

          STAY SAFE and be awesome!
          Best,
          Eugen.

          • Edk August 28, 2022 at 11:14 am #

            Thanks, Eugen, the script worked!

            I noticed that the Affiliate Coupon code was removed. I was able to add that piece of code back to the script you provided.

            Just in case anyone comes across this thread. Can you please add Affiliate coupon code to the document you provided to make things easier for them?

            Cheers,
            Ed

            • Eugen Bleck August 30, 2022 at 10:30 am #

              Hi Ed,

              Good morning and happy new week!

              Thank you for the update on this. I am glad it worked. Sure, I’ll have a look.

              STAY SAFE and be awesome!
              Best,
              Eugen.

  2. Eugen Bleck August 17, 2022 at 8:33 am #

    Hi Edward,

    Good morning. I trust you are doing great!

    Here’s how to go about it.
    Please add the following shortcode to your Affiliate Area page to display the affiliate url with the username of the affiliate:
    [affiliates_by_username][affiliates_url][/affiliates_by_username]

    To make the link(url) clickable use this shortcode instead: [affiliates_by_username][affiliates_affiliate_link][/affiliates_by_username]

    Please note that to access your affiliate Area page (Affiliate Dashboard page)
    Visit the link [siteurl]/wp-admin/admin.php?page=affiliates-admin-settings&section=pages, where [siteurl] is the domain name of your site. Once there you would find the pages with affiliate shortcodes and you simply have to add the shortcode above.

    So your affiliate dashboard page when edited as an admin or an editor should look like this:
    [affiliates_dashboard]

    [affiliates_by_username][affiliates_url][/affiliates_by_username]

    [affiliates_by_username][affiliates_affiliate_link][/affiliates_by_username].

    Thanks for using our plugins. And I remain at your disposal.

    Have a very productive and awesome day.
    Best,
    Eugen.

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