Display Username of Affiliate when Coupon Applied

After a coupon is applied, how can I display the affiliate it belongs to?

I initially figured the shortcode [referrer_user] would work in the same way, but that seems to only work for the affiliate URLs and not coupons.

3 Responses to Display Username of Affiliate when Coupon Applied

  1. George June 30, 2015 at 1:31 pm #

    Hi Bo,

    At the moment you can’t do it easily. You have to trigger a hook once the coupon is applied which will check the coupon’s name to whom it belongs and return the ID or username, or the affiliate ID and affiliate name if the affiliate is not registered as a user.

    That’s why i suggested to use the affiliates name or ID as a prefix to his/her coupons, ie my coupons should be named gtsiokos-1, gtsiokos-2 etc.

    Hope i cleared things up.
    Cheers

  2. Bo June 30, 2015 at 1:38 am #

    I’m a bit confused by your response.

    Once a customer enters in their Coupon Code, I want it to display their Username. Currently, it applies the coupon, but there is no indication who it belongs to. [referrer_user] still displays Direct after the coupon is applied and not the affiliate’s username. Is there any way to do this?

    I’m also not sure what you mean as in:
    “to display the affiliate’s username, you can use it as a prefix for his/her coupons.”
    The prefix is the same for all affiliate coupons. My coupon prefix is “raise”, so it is outputted as “raise234” or whatever the ID of the affiliate is.
    Can you elaborate on what you meant?

  3. George June 28, 2015 at 6:21 pm #

    Hi Bo,

    The shortcode [referrer_user] as you can see at the documentation is used to render information about the referring affiliate’s user account.
    At the moment in order to display the affiliate’s username, you can use it as a prefix for his/her coupons.

    Kind regards,
    George

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