Support

Home Forums Event Espresso Premium add to cart events that are no longer active

add to cart events that are no longer active

Posted: March 21, 2014 at 7:38 am

Viewing 27 reply threads


Morten Mouritzen

March 21, 2014 at 7:38 am

I can add events to my cart that are no longer active.

Here is my setup:
—————–
—————–

Create dates automatically or select manually? Yes
—————————-

Registration Starts On:
2014-03-03
—————————-

Registration Ends On:
2014-04-11
—————————-

(chosen one)
Yes (all created events are available for registration between the above registration dates).
—————————-

Event dates:
2014-03-03 to 2014-03-07
2014-03-10 to 2014-03-14
2014-03-17 to 2014-03-21
2014-03-24 to 2014-03-28
2014-04-07 to 2014-04-11
—————————-

I can see..
http://imgur.com/JvtZLh6

I want to see the ones in the red marked area…

I also need to be able to:
– Book all events that are still active
– Not to see events that are not active
– Not to be able to book events that are not active

What did i miss?


Morten Mouritzen

March 21, 2014 at 7:39 am

I want to see the ones in the red marked area…
http://imgur.com/LJQaVth


Morten Mouritzen

March 21, 2014 at 7:45 am

The thing is.. if this is not possible.. i can use this current setting and code in a piece of PHP that checks the date of the course and the end date. If its still ongoing i can let it echo to the screen, or i just dont.

thats the solution im sitting on now… but i rather not do that if i can click my way out of it πŸ™‚


Lorenzo Orlando Caum

  • Support Staff

March 21, 2014 at 9:39 am

Hi Morten,

Could you please share a link to this page so I can take a look? I’ll then run a quick test on a development site.


Lorenzo


Morten Mouritzen

March 24, 2014 at 1:55 am

Our page is called: lavpriskursuskalender.dk

It is in danish.

If you want access to it, we need to do it the other way. Im not posting credentials here πŸ™‚


Dean

March 24, 2014 at 3:00 am

Hi Morten,

Can you provide the direct link to the page that is having the issues please? Example http://lavpriskursuskalender.dk/book/?id=798


Morten Mouritzen

March 24, 2014 at 3:56 am

This site, i cant book from:
——————————
http://lavpriskursuskalender.dk/book/?id=710

This site, i can only book 1:
——————————-
http://lavpriskursuskalender.dk/book/?id=798


Tony

  • Support Staff

March 24, 2014 at 7:10 am

Hi Morten,

Before making any changes to the events, can you tell me what shortcode are you currently using on this page? http://lavpriskursuskalender.dk/book/?id=710

It looks like this is now two separate issues. The first being that ‘expired’ events (those events had not actually expired) where displayed in the list.

In your final reply it seems active events no longer displayed, have you altered the code?

The reason the events remained in the list is because the option

Yes (all created events are available for registration between the above registration dates).

When using this option ALL the events remain ‘Open’ until the registration end date. So in terms of Event Espresso they are still active.

If you go to the Event Overview and find that Event that was on the dates 2014-03-03 to 2014-03-07 from within your list above, you’ll find the registration end date == 2014-04-11 which means that event will remain ‘active’ until that date.


Morten Mouritzen

March 24, 2014 at 8:33 am

Hello Tony,

1)
This is the shortcode that i use: [EVENT_ESPRESSO_CATEGORY event_category_id=”excel-basic-1392890939″]

2)
I havent made any code changes as of yet. But i did say what i would do if there where no solution πŸ™‚

The not active events are not shown atm no, but i can book the events that are in the future look at this: http://lavpriskursuskalender.dk/book/?id=710

So all these 3 events are not able for booking.

3)
Yes, all events must be able to be open for booking. If the course is not still active it should not be able to book it.

I need to see only active events. I need to be able to book all that are active.

How is that achieved? πŸ™‚


Tony

  • Support Staff

March 24, 2014 at 8:59 am

1) Have you looked into using the Custom Template Add-on? You can achieve similar results to what you have with small code modifications. The events tables or recurring dropdown template maybe?

2) Can you go to Event Espresso -> Event Overview. Find/Edit the event with ID 475. Can you tell me the Event Registration Date (start & end) Also the Event Dates (start & end), possible with a screenshot like this: http://take.ms/GTRbK

Also within that event is there anything within the Alternate Registration Page field? http://take.ms/1YUAP

3)

Yes, all events must be able to be open for booking. If the course is not still active it should not be able to book it.
I need to see only active events. I need to be able to book all that are active.

Then you do not want all the Events within the series to be open with the same Registration Start/End date. You need the Registration_start date to be from today or before and the Registration_end date to be on either the Event_start date or Event_end date.

Lets focus on the first issue for the time being and when that is fixed I can explain how to correctly setup the events within the Recurring Events Manager.


Morten Mouritzen

March 24, 2014 at 9:30 am

Post 475 screenshot:
http://imgur.com/DoNOIK4

There is no Alternate Registration Page field.

Ok, lets look at the first issue πŸ™‚


Tony

  • Support Staff

March 24, 2014 at 10:09 am

Hi Morten,

Notice how Registration start is set to 2014-04-21.

That means registrations for that event will NOT open until that date. So people can not book onto the event. Try changing that date to 2014-03-21, update the event and then reload the page:

http://lavpriskursuskalender.dk/book/?id=710

Does it now display?


Morten Mouritzen

March 24, 2014 at 4:25 pm

Changing the date dident change anything.

Tony my issue is that, i need to create a set of manuel date events.

Meaning that i cant sit and edit every single event. So im not sure if i asked in the right way, but i cant edit every single event, it must be a 1 click create all that i made a date for πŸ™‚

So if i create a set of events that starts every monday and runs until friday, so basically 5 days per event.

If i create 5 of those, all 5 should be able to booking. Those that are not active anymore should not be.

Im just trying to make sure that we have the same understanding here ? πŸ™‚


Morten Mouritzen

March 25, 2014 at 1:53 am

I created a test site where the same issues are.. I tried what you said.. setting the Registration Starts On: and Registration Ends On: to reach all events.

I can still book expired events.

…Furthermore..

Using the: No (each event’s registration start and end dates will be incremented according to a formula).
That part will totally shut of the events that are in the future, and i can still book expired events.

Choosing the.. Yes (all created events are available for registration between the above registration dates).
I can book all events, which is what i want, however.. i can still book expired events.

So in essense.. if i can choose Yes (all created events are available for registration between the above registration dates).
and NOT book expired events, it works as it should.

How can i do that? πŸ™‚


Morten Mouritzen

March 25, 2014 at 2:13 am

In the file “event_list.php” on line ~411 there is a switch/case that have the function of:

switch(event_espresso_get_status($event_id)) {
case ‘NOT_ACTIVE’:
..

I tested some, and even so that an event is not active, it is rendered as active.

This is also very odd.


Tony

  • Support Staff

March 25, 2014 at 2:31 am

Hi Morten,

Would it be possible for you to create a temporary log in so we can take a look at the events please?


Morten Mouritzen

March 25, 2014 at 2:36 am

I created code that made what i wanted.

event_list.php line about~:430

<code>default:
	$status = event_espresso_get_is_active(0,$event_meta);
	$new_danish_end_date = date(&quot;d-m-Y&quot;, strtotime($end_date));
	
	if (strtotime($end_date) &lt; time()){
		//print &#039;&lt;p class = &quot;error&quot;&gt;Date has elapsed&lt;/p&gt;&#039;;

	} else {
		//Uncomment to show active status array
		//print_r( event_espresso_get_is_active($event_id));
		if ( empty( $path ) ) {
			include( $template_name );
		} else {
			include( $path );
		}
	}
	break;</code>


Morten Mouritzen

March 25, 2014 at 2:39 am

Hi Tony,

I made all possible tests sinde we talked last time.

Weather i choose:
Yes (all created events are available for registration between the above registration dates).

or

No (each event’s registration start and end dates will be incremented according to a formula).

The outcode is not what i want. So what i posted above is my solution.

I tried different date combinations and all.

I can give you access to our test domain. Please how can i send you the credentials?

Keep in mind that the solution i made is free for you to use for others, but if you know a “not code way as i did it solution” please i want to know too πŸ™‚


Morten Mouritzen

March 25, 2014 at 2:41 am

the
$status = event_espresso_get_is_active(0,$event_meta);
is not really needable, but i left it there for well “testing”


Tony

  • Support Staff

March 25, 2014 at 3:12 am

The default output for Event Espresso is to NOT show expired events so this should be working out of the box.

You can send us log in details using:

https://eventespresso.com/send-login-details/


Morten Mouritzen

March 25, 2014 at 3:41 am

i send it πŸ™‚


Morten Mouritzen

March 25, 2014 at 3:42 am

and i commented out the code that i made, so there are no mods now while u test πŸ™‚


Tony

  • Support Staff

March 25, 2014 at 3:56 am

Hi Morten,

Can you recheck those credentials please as they do not seem to be working.


Morten Mouritzen

March 25, 2014 at 3:59 am

They work now.

Sorry i forgot the email i typed in was already in use.


Morten Mouritzen

March 25, 2014 at 6:39 am

Yo Tony..

I have been testing ever since.. i just dont think that EE can do what im talking about. I mofified the code on our real site now, and the events that are not active will not be shown.

Using the recurring event funktionality creates dynamic start registration dates, and thats the problem.

So i HAVE TO CHOOSE Yes (all created events are available for registration between the above registration dates).

And use the code above as i mentioned already.


Tony

  • Support Staff

March 25, 2014 at 7:19 am

Your code basically does what event espresso does, only slightly differently, it all depends on how the events are setup.

Registration_start = when users are able to register onto the event.
Registration_end = when users are no longer able to register onto the event.(regardless of the Event date)
Event start_date = the start date of the event
Event end_date = the end date of the event.

An event will remain open for registration until Registration_end <= today. This is regardless of the Event dates. So if you have an event with Event start/end == 2000-01-01 with Registration_end date == 2014-03-28 that event would still be considered Open for registration. Your considering that event as Expired, as Event start/end has passed, but Registration is still open.

So i HAVE TO CHOOSE

Not necessarily. If you want all you events to be open for registration from the day they are created and then close on the day they start set the option:

No (each event’s registration start and end dates will be incremented according to a formula).

Set ‘Registration Starts On’ to a date far back into the past. If you are creating a years worth of events you need to make sure this is set back further than 1 year, if creating 6 months, make sure this is set further back than 6 months etc.

Set ‘Registration Ends On’ to the Event start date of the first event.

For example, here is a Daily recurring event that will all be open when created and close for registration on the start date of the event.

http://take.ms/9LT3m

Notice the highlighted dates.

Does that help?


Morten Mouritzen

March 25, 2014 at 7:28 am

Yea i 100% understand what you are saying.

Our events are created manually, so all events have their own start and end date.

The registration start will be auto incremented according to a formula. Thats very nice, but also the registration dates. Thats an issue i havent been able to avoid.

So i choice “yes” instead og no to the question, and all evetns where able to be booked. However expired evnts was still shown. So i put in the code in order to fix it.

I dident find any solution to what i wanted other than the code that i put in.

Can you please create an recurring event of 4 events where, set with manual dates, NOT auto date calculations…..

2 of the courses is expired
2 of the course are not expired

Visit the page and verify that only the not expired courses are available for booking.

And then tell me how u did it, becuase that i just wasent able to do πŸ™‚


Tony

  • Support Staff

March 25, 2014 at 8:08 am

Unfortunately I can not follow your site very well.

I have created the events locally to show you. Here is a manual recurring event, (5 events), the series starts from 2014-03-23 and has 1 event each day. http://take.ms/PcW8b

Then created that series.

So events on 2014-03-23, & 2014-03-24 should be closed (as they have passed)
2014-03-25 could be either open or closed (depending on the registration_end time) – mine is open as registration_end is set to 11:59pm
2014-03-26 & 2014-03-27 should be open as registration_end should be set to 2014-03-26 & 2014-03-27 respectively.

Looking in the Event Overview we can see this is exactly how they have been created: http://take.ms/DdZWf

When creating this series I placed the events within a category. Then after creating I renamed each on to inlcude a number 1-5. So on a page using the shortcode

[EVENT_ESPRESSO_CATEGORY event_category_id=”morten-test-1395754765″]

The events that should display are 3,4,5. (As 1 & 2 are expired)

http://take.ms/EAWEn

I added some notes to my original screenshot when creating the series. http://take.ms/BQvdA


Morten Mouritzen

March 26, 2014 at 12:38 am

Hello Tony πŸ™‚

Thanks for the big guide, i am sure it will be helpful.

The thing is just that, i tried doing that, but i dident get the same result. I dont know if the version of EE has something to do with this, or some weird edit that i made long ago.

Thing is, u show me that it works, i will have to look further into it.

Yea, my site is in danish and thats how things are. I understand its hard to understand πŸ™‚

Thanks, i will take it from it πŸ™‚

Viewing 27 reply threads

The support post ‘add to cart events that are no longer active’ 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