Support

Home Forums Event Espresso Premium Error creating promo codes

Error creating promo codes

Posted: November 3, 2014 at 1:19 pm

Viewing 8 reply threads


cgreenberg

November 3, 2014 at 1:19 pm

Upon clicking ‘Submit’ when creating a new promo code, the following error occurs:

The discount code was not saved. Unknown column ‘apply_to_all’ in ‘field list’.
Debug:
Array ( [coupon_code] => SASDATA14 [coupon_code_price] => 20 [coupon_code_description] => [use_percentage] => Y [apply_to_all] => 0 [wp_user] => 1 ) Number of vars: 6
Number of cols: 6


cgreenberg

November 3, 2014 at 1:21 pm

Sorry:

Using EE3 Version 3.1.36.6.P


Lorenzo Orlando Caum

  • Support Staff

November 3, 2014 at 1:50 pm

Hi,

Could you temporarily deactivate all plugins and reactivate only Event Espresso and re-test?

If it works, then please restore a few plugins at a time until you locate the source of the conflict.


Lorenzo


cgreenberg

November 4, 2014 at 1:04 pm

Hello!

I tried deactivating all plugins and then reactivating EE as you suggested, and the test failed again:

The discount code was not saved. Unknown column ‘apply_to_all’ in ‘field list’.
Debug:
Array ( [coupon_code] => TEST [coupon_code_price] => 10 [coupon_code_description] => [use_percentage] => N [apply_to_all] => 0 [wp_user] => 1 ) Number of vars: 6
Number of cols: 6

WordPress database error: [Unknown column ‘apply_to_all’ in ‘field list’]
INSERT INTO wp_events_discount_codes (coupon_code,coupon_code_price,coupon_code_description,use_percentage,apply_to_all,wp_user) VALUES (‘TEST’,’10’,”,’N’,0,1)


Lorenzo Orlando Caum

  • Support Staff

November 4, 2014 at 3:11 pm

Hi,

Was this site updated from a prior version or was this a new install?


Lorenzo


cgreenberg

November 4, 2014 at 3:34 pm

This is an existing install that has been updated a few times; recently I set up a development server for making some other changes to the site, and then migrated back to the production server. I’d like to update to EE4, but I’m stuck at EE3 until you implement promotional codes into the new version. It’s a big problem if they aren’t working in EE3 either! 🙂


Josh

  • Support Staff

November 4, 2014 at 4:00 pm

Hi there,

The apply to all field was something that was added in version 3.1.36. Was your production site running 3.1.36? If not, then you may have wiped out the new promo code fields.

One way to restore these is by initiating a database update. This can be done by temporarily changing the version numbers listed in espresso.php to something like 3.1.35.p, then let the update run. Or restore the backup of your database to a point prior to the changes on dev were merged in.


cgreenberg

November 5, 2014 at 9:55 am

Thanks Josh, this seems to have done the trick. Any update on when promo codes will be added to EE4?


Garth

  • Support Staff

May 5, 2015 at 10:14 am

Starting today, current support license holders can opt in to the pre-release channel and download the Event Espresso 4.7 and Promotion add-on pre-releases.

We’d love to get your feedback on some of the new promotion features and changes that we’ve been working on. These include:

  • New interface for managing promocodes
  • Promo code discounts now apply to entire order instead of per ticket
  • Promo code generator
  • Automatic (non-promo-code) discounts
  • Discounts limited by quantity
  • Discounts limited by start date and end date
  • A widget for displaying non-promo-code discounts
  • A shortcode for displaying non-promo-code discounts
Important: The Event Espresso 4 promotions add-on will activate only if Event Espresso 4.7 is active. This means you’ll need to install the Event Espresso 4.7 pre-release before installing the promotions add-on.

If you haven’t already opted into Event Espresso’s pre-release channel, you can go to your account page and check the box to opt in to the pre-release channel. Once you opt in, the download files will be available under the EE4 tab under the Pre Release Downloads heading.

You can find out more information about in the pre-release channel guide.

If you have feedback about Promotions or the 4.7 release, please reply to that Promotions announcement or start another new topic.

Viewing 8 reply threads

The support post ‘Error creating promo codes’ 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