Posted: February 28, 2013 at 11:59 am
|
Greetings gang, Just imported a batch of vouchers into the system, they all appear with ACTIVE status. No matter which code I use, I always get this message: Sorry, voucher code 1000130914999 is either invalid, expired, has already been used, or can not be used for the event(s) you are applying it to. I’ve confirmed the event is set to accept groupon. Any ideas of where to start debugging this? |
HI Kraft, What other Event Espresso add-ons do you have activated? I seem to recollect a problem with the Multiple Event Registration addon and vouchers, but that might have been resolved. Let me know. |
|
Hi Brandon, I’d start debugging this by looking at the database table prefix for the table that stores the voucher codes. The table will be yourprefix_events_groupon_codes. Then, you can check in the _options table under the option name: events_groupon_codes_tbl. The value there should match with the name of the table. I’ve seen this happen before where the database table prefix had been changed, but the option was not updated to use the new table prefix. If that checks out, you could also make sure you’re on the most recent version of the Groupon/voucher add-on. |
|
|
Sorry about the delay in response. My oldest ended up needing to go to the ER Thurs night, which turned into a hospital stay for the weekend. All home and fine now. I’m going to start digging around to see if I can get a better idea of where the error is coming from… |
|
So far, here’s what I got: Line 90 of use_groupon_code.php returns a 1. I assume the 1 indicates the groupon is present? |
|
Well, I take that back. Running: |
|
Alright, I got it working. Tell me if I am going to screw up something else. I commented out line 81 ($SQL .= ” AND ( event_id = 0 OR event_id = %d )”;) and removed the reference to event_id in the wpdb call on 83. Looking at it, there isn’t an event_id in the groupon codes table, so I’m thinking it was pulling null on that db query. Tried a couple other test registrations; all seems to be working now. |
Hi Brandon, There should be an event_ID column in the groupon codes table. I double checked my install and there is one there, and line 60 of espresso-groupons.php should have added the column when you activated the groupon add-on. |
|
|
What version was that added? I’ve had the groupon plugin installed for a few versions—perhaps it didn’t add the tables upon upgrade? |
|
I recycled the plugin (deactivate/reactive) and the event_ID column was added. Don’t have a good reason offhand for why that didn’t occur when upgrading. |
It’s possible that the table wasn’t created when you updated since it didn’t run the update scripts that happen on activation. Thanks for following up and letting us know what fixed it. |
|
The support post ‘Voucher not being accepted’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.