Support

Home Forums Event Espresso Premium "Add to Cart" behavior doesn't change for CLOSED event…need help

"Add to Cart" behavior doesn't change for CLOSED event…need help

Posted: October 3, 2013 at 12:54 pm

Viewing 7 reply threads


BrooklineTaiChi

October 3, 2013 at 12:54 pm

I am using the [ESPRESSO_CART_LINK…] shortcode in my posts for workshops. If the event registration passes, and the event has a status of CLOSED, the Add to Cart button is still there, and if you click on it, it then shows “View Cart” (If you view cart, the event is not in there, which makes sense because it’s closed, but not from a user’s standpoint)

Of course someone can go in on the backend and update posts after events are over and remove the shortcode, but this is too manual and leaves too much room for error.

Is there a typical way of handling this automatically via code? Does someone have a code snippet handy for if event is not active/ongoing then replace the active link with something that isn’t clickable and says something like “CLOSED”?

My workshops are set to not display registration page if that’s relevant.

Here is a post that has 3 “Add to Cart” buttons, the first one listed is for an event that has passed

Hoping to take the site live Monday night…just down to a few issues…thanks in advance.


BrooklineTaiChi

October 3, 2013 at 12:55 pm

Hmmm. link got stripped out, here it is again:

http://brooklinetaichi.org/freshwp/jings-the-inner-core-of-tai-chi-and-neijia/


Josh

  • Support Staff

October 3, 2013 at 1:03 pm

Hi there,

I beleived this was fixed in the update we released yesterday. It’s a .1 release of Event Espresso (3.1.35.1.P)


BrooklineTaiChi

October 4, 2013 at 12:56 pm

Hi Josh, thanks…but I’m still having the same issue. I didn’t see anything in the change log that mentions my issue, but I did upgrade…and the behavior hasn’t changed from what I described.

If it is indeed fixed, is there somewhere specific I can look to see if I have the fix in place? We’re still trying to go live on Monday, but this issue is definitely holding things up.


Josh

  • Support Staff

October 4, 2013 at 2:30 pm

Hi there,

If you look in the changelog, the Multi Event Registration cart links break if more than one event id is in the event_id parameter fix was the ticket that this issue was fixed under.

I have a test page set up that shows two add to cart shortcodes. One is for an open event, the other closed:

http://eetesting.info/3.1.josh/mer-test/

You might also try the [EVENT_LIST] shortcode, which will display a list of events (and their descriptions if you enable event list descriptions in Event Espresso>Template Settings) for a more automated workflow of displaying events with add to cart links.

https://eventespresso.com/wiki/shortcodes-template-variables/


BrooklineTaiChi

October 4, 2013 at 3:44 pm

Hi Josh, thanks but that is definitely not the behavior I am getting. I tried the plugin update twice.

I am using the EVENT_LIST short code elsewhere on the site, but for my use here it’s not appropriate. If you take a look at the link I provided, it’s the first “Add to cart” button (I styled it to match the “button” look) which is for a CLOSED event, the other on that page are still open.

Even if you could point me to where in the code this fix was made, that would help me. I have the cart link shortcode in custom-shortcodes.php and I don’t know if the original lies elsewhere? Perhaps I am overwriting the intended fix?


BrooklineTaiChi

October 4, 2013 at 5:30 pm

So I am now sure that I’m missing something important in custom_shortcodes.php in order for this to work. If anyone could point me to the original code for the [ESPRESSO_CART_LINK] shortcode, I’d really appreciate it so I can compare and see what I’m missing. I have been looking, and will continue, but if someone could point me to it, I’d really appreciate it. Thanks.


BrooklineTaiChi

October 4, 2013 at 5:43 pm

Ok, I finally found it in cart.php (and boy I even looked in there before…oops) and because I had customized it (in order to style from a link into more of a button) I was not picking up the bug fixes. It’s not a perfect solution, but I did a diff and am trying out the new code.

Viewing 7 reply threads

The support post ‘"Add to Cart" behavior doesn't change for CLOSED event…need help’ 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