Support

Home Forums Social Coupons Integration (EE3) Voucher not being accepted

Voucher not being accepted

Posted: February 28, 2013 at 11:59 am

Viewing 10 reply threads


Kraft

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?


Garth

  • Support Staff

February 28, 2013 at 2:07 pm

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.


Josh

  • Support Staff

March 1, 2013 at 4:06 am

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.


Kraft

March 3, 2013 at 9:18 pm

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.
Garth: Running EE 3.1.30.7P, Calendar 2.0.4 and Social Coupons 1.5.3. Did use Voucher Import 0.1 to import, though it isn’t working on a code manually added before Voucher Import was initially installed.
Josh: They match up (both as wp_events_groups_codes). I wasn’t using the most recent version initially—the last version before the name change, if I recall correctly, but had already upgraded to 1.5.3 before starting the post.

I’m going to start digging around to see if I can get a better idea of where the error is coming from…


Kraft

March 3, 2013 at 9:42 pm

So far, here’s what I got:

Line 90 of use_groupon_code.php returns a 1.
Lines 94 and 95 are returning blank.

I assume the 1 indicates the groupon is present?


Kraft

March 3, 2013 at 9:47 pm

Well, I take that back. Running:
printr( $groupon->groupon_status);
printr( $groupon->groupon_code);
printr( $groupon->groupon_holder);
printr( $groupon[‘id’]);
printr( $groupon[‘code’]);
at line 90 all returns just “1”.


Kraft

March 3, 2013 at 10:08 pm

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.


Josh

  • Support Staff

March 4, 2013 at 3:24 pm

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.


Kraft

March 4, 2013 at 3:27 pm

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?


Kraft

March 4, 2013 at 3:35 pm

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.


Chris Reynolds

  • Support Staff

March 5, 2013 at 2:37 pm

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.

Viewing 10 reply threads

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.

Event Espresso