Issues with Price

Posted in

In the email notification that is sent to the affiliate, the amount that short code pulls through a number with 6 digits after the decimal point. So for example the amount shown in the email would be £23.8000000

How can I fix this.

Also some of our products do not carry any affiliate fee, but the affiliates still advertise them and sell them. They then get an email to say they have made £00.000000. If there any way to remove this from the email when there is no fee (only).

Thanks

4 Responses to Issues with Price

  1. David September 8, 2017 at 7:13 pm #

    Hi awesome [affiliate_name],

    You made a sale! Yay!

    A referral has been credited to you on [site_title] for the amount of [referral_amount] GBP ! Congrats!

    Thanks so much!
    [site_title]
    [site_url]

    • antonio September 11, 2017 at 7:25 am #

      Thanks,
      The email should be sent with two decimals.
      But we can use the ‘affiliates_notifications-tokens’ filter.This code should work:
      add_filter( 'affiliates_notifications_tokens', 'my_affiliates_notifications_tokens', 10, 1 );
      function my_affiliates_notifications_tokens ( $data ) {
      $data['referral_amount'] = number_format( $data['referral_amount'], 2 );
      return $data;
      }

      Kind Regards,
      Antonio B.

  2. David September 8, 2017 at 7:12 pm #

    Hello

    I see it as two decimals and when I go into the order it is also two decimals.

    This is the notification message –

  3. antonio September 8, 2017 at 8:32 am #

    Hi David,
    How do you see the referral amount from Affiliates->Referrals, with two or six decimals?
    Please share your affiliates notification message (from Affiliates->Notifications), please use pastebin.com
    Related to the referrals with £00.000000, sorry, right now there isn’t an option to filter this notifications (We will study it, because it seems to make sense to be able to filter it).
    Kind Regards,
    Antonio B.

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