Page 1 of 1

Bug in Coupon / Buy Now!

PostPosted: April 28th, 2011, 10:39 am
by nobrain
There is a nasty "omission" in the S@ Pro that I would hope can get fixed ASAP it will really hurt sales. The problem is that when you create a one-time sale (Authorize.Net Buy Now post/page form) and you apply a coupon code it says "Now: $Price / Monthly"... Yes, it says MONTHLY! That is sure to send buyers running.

I know I can edit what it says (language) but then it appears it would say the same for my monthly subscribers.

I am missing something or when can this be fixed?

Re: Bug in Coupon / Buy Now!

PostPosted: April 28th, 2011, 12:48 pm
by Cristián Lávaque
Thanks for reporting this.

Could you please share the shortcode you used for the form and the definition for your coupon? I'll try to reproduce this on my end.

Thanks!

Re: Bug in Coupon / Buy Now!

PostPosted: April 28th, 2011, 1:03 pm
by nobrain
[s2Member-Pro-AuthNet-Form ids="446,317" exp="120" desc="Product - One Time Fee" cc="USD" custom="mysite.com" ra="497" sp="1" accept="visa,mastercard,amex,discover" coupon="" accept_coupons="1" coupon="SALE300OFF" default_country_code="US" captcha="0" /]

Coupon is:
SALE300OFF|300.00

Re: Bug in Coupon / Buy Now!

PostPosted: April 28th, 2011, 1:18 pm
by Cristián Lávaque
I was able to reproduce it and your code seems OK (the duplicate coupon attribute isn't causing it).

I sent Jason (the Lead Developer) an email about it and he should be getting back to you as soon as he sees it.

Thank you for finding and reporting it!

Re: Bug in Coupon / Buy Now!

PostPosted: April 29th, 2011, 5:19 pm
by Jason Caldwell
Thanks for reporting this important issue.
~ and thanks for bringing this to my attention Cristián.

Yes, definitely a bug. Thank you.
I'm having this fixed in the next release.
If possible, I'll update this thread with a patch file asap.

@TODO: Bug with sp="1" and Coupon Code term descriptions.
Bug found in /s2member-pro/classes/gateways/authnet/authnet-utilities.inc.php

Done. This bug was fixed in the official release of s2Member 110606+.

Re: Bug in Coupon / Buy Now!

PostPosted: May 5th, 2011, 1:40 pm
by nobrain
Any updates. This bug is KILLING my sales! When you said it would be fixed in the next release I assumed that meant in a couple of days max. Yes, I have had SEVERAL people tell me they will not signup because it says MONTHLY. I need this fixed today or I will have to kindly ask for a refund of my money and to cancel my subscription. This bug makes s2Member Pro unusable for me.

I might also have to pay fix the bug myself right now but I think that shouldn't be my expense and I also then would be off-set with the release tree. I am not trying to be a jerk but if you understand this bug you understand why it is killing sales.

Re: Bug in Coupon / Buy Now!

PostPosted: May 5th, 2011, 2:25 pm
by nobrain
Had it hacked - so works for now but I had to pay for it. :-(

CHANGED Line 699 (added 'chris'' directive):
$coupon["directive"] = (preg_match ("/^(ta-only|ra-only|all|chris)$/", $_coupon[3])) ? $_coupon[3] : "all";

ADDED directive command:
else if ($coupon["directive"] === "chris" && !$attr["tp"])
{
$ta = number_format ($attr["ta"] - $coupon["flat-rate"], "2", ".", "");
$ta = ($ta >= 0.00) ? $ta : "0.00";
/**/
$ra = number_format ($attr["ra"] - $coupon["flat-rate"], "2", ".", "");
$ra = ($ra >= 0.01) ? $ra : "0.01";
/**/
$desc = 'COUPON ' . $cs . number_format ($coupon["flat-rate"], 2, ".", "") . ' off. ( Now: ' . $cs . c_ws_plugin__s2member_utils_time::amount_period_term ($ra, $attr["rp"] . " " . $attr["rt"], $attr["rr"]) . $tx . ' )';
$response = '<div>Coupon: <strong>' . $cs . number_format ($coupon["flat-rate"], 2, ".", "") . ' off</strong>. ( Now: <strong>' . $cs . $ra . ' One Time Charge </strong> )</div>';
}
---

Now shows ( Now: $100.00 One Time Charge)

Re: Bug in Coupon / Buy Now!

PostPosted: May 5th, 2011, 3:28 pm
by Jason Caldwell
Thanks for the follow-up.
We're working as quickly as possible on the next release.

Re: Bug in Coupon / Buy Now!

PostPosted: May 6th, 2011, 10:25 pm
by Jason Caldwell
Thanks for your patience.

I'm attaching two files that can be used to patch existing installations of s2Member Pro v1.5.8. These two patch files will correct the bug in Coupon Code descriptions returned for Specific Post/Page "Buy Now" transactions. The next release of s2Member Pro will include these fixes, but you can use these patch files to correct this bug immediately if you prefer. Thanks to everyone for reporting this important issue.

PayPal Pro Forms.
Patch #1 ( unzip, then upload via FTP, and let it overwrite your existing file )
/s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php
paypal-utilities.inc.php.zip
(5.06 KiB) Downloaded 13 times


Authorize.Net Pro Forms.
Patch #2 ( unzip, then upload via FTP, and let it overwrite your existing file )
/s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php
authnet-utilities.inc.php.zip
(8.38 KiB) Downloaded 10 times

Re: Bug in Coupon / Buy Now!

PostPosted: June 13th, 2011, 11:45 pm
by Jason Caldwell
@TODO: Bug with sp="1" and Coupon Code term descriptions.
Bug found in /s2member-pro/classes/gateways/authnet/authnet-utilities.inc.php

Done. This bug was fixed in the official release of s2Member 110606+.