Custom Method Coupon Rates plugin

Posted in

Firstly …thank you, thank you, thank you.
Your work on that plugin is greatly appreciated.

I am having a little problem with it, and hoping for a little guidance/help.

I **installed and activated it, and then set up a rule.
– Referral Rate: 0.538461538
– Coupon Prefix: wholesale
Then, via Affilliates>Settings>Commissions, I set method to “Referral Amount Method” and value to “Affilliates_CR_Method::coupon_rates”.

When I ran a sample order ($0.65 total) with a “wholesale” coupon, it calculated commissions as 0 (zero).
Expected commissions of $0.35.
Likewise, when I ran identical test orders with a non wholesale coupon, it still calculated commissions at 0 (zero).
Expected $0.07.

My several attempts included, both, leaving Affiliates_CM_Coupon_Rates::REFERRAL_RATE_DEFAULT as zero and setting it to 0.1111111. Neither seemed to have any effect.

Is there any other setting or something anywhere else I’m supposed enable to get this to work?
Or ???
I’ll keep playing with it, but would really appreciate some insight.

***NOTE:
Initially, installation failed on an call to undefined function error over write_log() in the init() of Affiliates_CR_Method. I commented that line out for now.

Also, there was a 3 char limit for the coupon prefix in Affiliates_CM_Coupon_Rates::affiliates_admin_em_light() which I also commented out in order to allow for the “wholesale” prefix.

6 Responses to Custom Method Coupon Rates plugin

  1. William August 12, 2016 at 2:24 pm #

    Ahhh, thanks

    I looked in the affiliates tables and didn’t see it there.
    Forgot about/didn’t think to look in wp_options 🙂

  2. George August 12, 2016 at 9:25 am #

    Hi William,

    In our case, the plugin settings are stored in the wp_options table.
    For more information on how we can store in the WP database, please have a look at Writing a Plugin, Plugin API and Class Reference/wpdb.

    Cheers

  3. William August 11, 2016 at 2:49 pm #

    BTW, when looking at the code, I’m not recognizing a call to save the values/settings for this plugin in the DB.
    Where are they stored? What data-persistence layer is being employed?

  4. William August 11, 2016 at 2:39 pm #

    Man! Thank you!

    I’ll give it a shot tonight and provide feedback

  5. George August 11, 2016 at 8:08 am #

    Once installed, you should choose the Affiliates_CR_Method::coupon_rates under Affiliates > Settings > Commissions and set the desired values under Affiliates > Affiliates CM Coupon Rates form.

    Cheers

  6. George August 11, 2016 at 7:57 am #

    Hi William,

    I have updated the plugin.
    I would suggest you to keep the prefix and raise the limit instead. That way you can apply the rate to a wider range of coupons.
    If though this doesn’t fit, you can always add more prefix and rate text fields.

    Cheers

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