Support

Home Forums Event Espresso Premium Make ticket Sell Until = Event start date

Make ticket Sell Until = Event start date

Posted: May 1, 2021 at 3:44 am


Mark

May 1, 2021 at 3:44 am

Hi,
I am facing an issue and need help in the form of SQL queries or something similar to this.
I want to make the ticket sell until the fields value equal to the event start date field value, which means a ticket can be on-sold until the event starts.
Hope you got my point.
Just look at the SS for more clarification of the idea.

I have a lot of events in my database, doing it manually is not reasonable so I need any other shortcut solution(any database query or any other hack).
Any help would be appreciated.
Thanks.


Mark

May 5, 2021 at 3:22 am

Need to follow up on this thread.


Tony

  • Support Staff

May 5, 2021 at 5:57 am

Hi Mark,

Under support we won’t hack up the database for features we don’t currently have (Recurring events) and writing SQL queries for this is going to be error-prone, so again, not something we can provide under support.

The best way I can think of doing this is using our model system:

https://github.com/eventespresso/event-espresso-core/tree/master/docs/G–Model-System

Using the models you can pull the events, then pull the datetime(s) from that event ad loop over each ticket linked to the datetime setting the sell until value to the datetime end date/time.

Are all of your events set up the same? If so, what set up do they use?

For example, single datetime single ticket?


Mark

May 5, 2021 at 6:13 am

I have multiple tickets in an event and want to make the sale until DateTime of the ticket to match the event start date. Means tickets can be purchased by the clients until the event not started. As the event gets started the ticket sale has been closed.


Tony

  • Support Staff

May 5, 2021 at 6:39 am

I understand what you are trying to do, but the above doesn’t tell me how your events are set up.

Do you only have a single DateTime within the event? Events can have multiple DateTimes, which means the ‘event start date’ is different based on the DateTime the tickets are assigned to and the current date, that all changes how you need to update the events.

If you only have a single DateTime with multiple tickets assigned to that DateTime, are all of your events set up in the same way?

The support post ‘Make ticket Sell Until = Event start date’ 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