Support

Home Forums Event Espresso Premium Is there any function we can use to view cart items?

Is there any function we can use to view cart items?

Posted: October 12, 2015 at 5:01 am

Viewing 1 reply thread


Joe Flynn

October 12, 2015 at 5:01 am

In our single event page, we want to show different contents based on if this event is already listed in cart or not. Is there any functions we can use to check that? Or is there any function [eg. get_cart_items()] to see what items are currently in cart?
Thanks


Josh

  • Support Staff

October 12, 2015 at 1:37 pm

Hi Joe,

We recommend using the model system in Event Espresso to get this kind of information.

Here’s one example of a little function that returns an array of events and the tickets (event ID and ticket ID) from the cart.

https://gist.github.com/joshfeck/a9e74b9dea2badd2448c

Viewing 1 reply thread

The support post ‘Is there any function we can use to view cart items?’ 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