Support

Home Forums Recurring Events Manager Add-on Edit Recurring events without reinstating deleted occurrences

Edit Recurring events without reinstating deleted occurrences

Posted: April 29, 2015 at 6:35 am


British Magic Museum

April 29, 2015 at 6:35 am

Hi There, I need to add promo codes to existing events that are part of a series and I know from past experience doing so will reinstate deleted occurrences. I am hoping there is a workaround via the database. Any help greatly appreciated!!!

Oliver
DMK


Tony

  • Support Staff

April 30, 2015 at 5:58 am

Hi Oliver,

You are correct in that if you apply a promo code to all of the series REM will recreate any events that have been deleted.

Do you event already accept promo codes?

I’m asking because you could add a global promo code which will apply to all events that accept promo codes, this will require a little monitoring of the registrations to check the code isn’t being abused but does not require DB manipulation.


British Magic Museum

April 30, 2015 at 7:26 am

Sadly not Tony. When the events were created we didn’t anticipate this option.


Tony

  • Support Staff

May 5, 2015 at 3:26 am

I’ve been looking into updating the events through the DB.

Its fairly simply to enable promo codes within an event, however you’ll need to know the event ID for each event occurrence that you want to update. Which means this will likely take the same amount of time each way.

Currently I think the best way to do this is to apply the event to the series and the manually remove the events again. Doing the above through the DB I don’t think will save any further time but could cause more problems (if something goes wrong)

There are 2 ways to do go about this, enable promo codes for all of the events you want, then create a global promo code (which applies to any event that accepts promo codes)

Or if you want to apply a specific code, just for those event, you’ll need to enable promo codes, select that specific code (global’s will still apply) for your first event, then apply that to the series.

Unfortunately REM does not keep track of individual events within a series, but rather tracks the actually series, or more specificity the dates used to create the series. If you alter events within the series, REM uses the same functionality as when creating the series to update it and so re-creates them.


British Magic Museum

May 6, 2015 at 4:33 am

I need to apply event codes to all events (there is two that don’t need it but I can remove it from easier than adding it to the other 1500 events). The DB method would be risky but faster.

Oliver


Tony

  • Support Staff

May 6, 2015 at 6:05 am

Ah ok, I was under the impression this was a select series within other events.

Enabling Promo codes for an event within the database is done by simply changing the ‘use_coupon_code’ column to ‘Y’ within the wp_events_detail table.

If using a Global coupon code that’s all you need to do, if the event accepts promo codes it accepts all global promo codes you have created.

I’m assuming you are using PHPMyAdmin?

Before going any further you’ll want to first create a database backup just to be safe. You can do this within phpMyAdmin from the Export tab – http://take.ms/qAmAb

You can use PHPMyAdmin to pretty much build the query for you.

If you select the database, then the wp_events_detail table (wp_ may be different if the a different prefix has been set)

Scroll to find the ‘use_coupon_code’ and change one of the events to ‘Y’ (double click on the value to edit it) – http://take.ms/FPiVB

Then if you scroll back to the left, you’ll see the query used to do the update – http://take.ms/ud6KI

Copy that query and click the SQL tab.

Paste that query, replacing any other that’s there – http://take.ms/NIgBG

That query only sets use_coupon_code to Y for a specific event ID, so to update ALL your events to allow promo codes remove the WHERE clause – http://take.ms/DPQ3c

That will update ALL rows to have use_coupon_code = ‘Y’.

If you want a specific ID range you can use BETWEEN XXX AND YYY on the WHERE clause, like this – http://take.ms/kcbWV

Note – modifying the database is not something we usually support. Be sure to have a backup you can revert to in case this goes wrong as we can not be responsible for fixing it. Your queries will be slightly different to mine, but using phpmyadmin means that most of the work is done for you 🙂

Let me know if you need anything explaining further.


British Magic Museum

May 6, 2015 at 6:51 am

All sorted thank you so much!! You guys are awesome! Great support as always.

The support post ‘Edit Recurring events without reinstating deleted occurrences’ 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.

Support forum for the Recurring Events Manager add-on.
Documentation for Recurring Events Manager Add-on
http://eventespresso.com/wiki/recurring-events-manager-add-on/

Status: closed

Updated by  British Magic Museum 4 years, 1 month ago ago

Topic Tags

Notifications

This topic is: resolved
Do NOT follow this link or you will be banned from the site!