Affiliates Gravity form issue

Hi

I am using affiliates pro plugin…. I want $1 referral Per form submission on cash payment and want 3% commission on pay online but when i select “Enable the Affiliates integration for this form?” then we get commission and when i select “base amount ” then we get $1 but we want both $1 per form submission on cash payment and 3% commission on pay online… How can i do it ?

Thank You.


Comments

7 responses to “Affiliates Gravity form issue”

  1. patrick Avatar
    patrick

    Hi

    $1 not added by this code ..$1 is multiply with the commission then add …we have set 3% commission so add 0.3 value not $1

    add_filter( ‘affiliates_gravity_forms_products_amount’, ‘my_affiliates_gravity_forms_products_amount’, 10, 3 );
    function my_affiliates_gravity_forms_products_amount ( $amount, $products, $entry ) {
    return $amount + 1;

    If we set this code then add one dollar

    add_filter( ‘affiliates_gravity_forms_products_amount’, ‘my_affiliates_gravity_forms_products_amount’, 10, 3 );
    function my_affiliates_gravity_forms_products_amount ( $amount, $products, $entry ) {
    return $amount + 33.333333333333333+0.01;

    How can i Solve this ?

    Thanks

    1. antonio Avatar
      antonio

      Hi Patrick,
      Finally what is the solution that you are using? The ‘affiliates_gravity_forms_products_amount’ filter or the last gist code? If you want to add two independent commissions, I think the second solution (gist code) is better.
      Kind Regards,
      Antonio B.

  2. patrick Avatar
    patrick

    Hi

    Thanks for reply

    I want $1 referral Per form submission on pay at the door and want 3% commission on pay online ….Not both at a time .

    Thank you.

    1. antonio Avatar
      antonio

      Ok,
      Then I think that the best solution could be add an extra referral when a referral is created from GF.
      Something like this: https://gist.github.com/eggemplo/61765f38ab6a9262225a3c5613818380
      Kind Regards,
      Antonio B.

  3. patrick Avatar
    patrick

    Hi

    How can i use this function for pay online and pay at the door users ?

    Thank you

    1. antonio Avatar
      antonio

      Hi,
      With this filter you can change the $amount calculated, so you can add one extra dollar.
      In this function you can add your extra code to process the payment, but remember that Affiliates doesn’t process the payments.
      Kind Regards,
      Antonio B.

  4. antonio Avatar
    antonio

    Hi Patrick,
    By default this option is not available, please have a look at the documentation page.
    You could use the ‘affiliates_gravity_forms_products_amount’ filter, something like this:
    add_filter( 'affiliates_gravity_forms_products_amount', 'my_affiliates_gravity_forms_products_amount', 10, 3 );
    function my_affiliates_gravity_forms_products_amount ( $amount, $products, $entry ) {
    return $amount + 1;
    }

    Kind Regards,
    Antonio B.

Share