Home Forums Multiple Event Registration Add-on Short code to add multiple events AND view cart

Short code to add multiple events AND view cart

Posted: November 15, 2012 at 7:46 pm

Gary Ray

November 15, 2012 at 7:46 pm

Using the short code, I was able to automatically add multiple events to the shopping cart but was unable to make it automatically move to shopping cart. IS there a way to do this? Oh, I guess I should mention that I have the MER add on.

The reason that I would like to do this is because I have multiple prices on two of the events and on the page that lists the events the price that shows up for those two events are some of the highest prices. It seems random as to which price gets listed. I would like either the lowest price to show up or no price at all. Unfortunately, I am not a developer so altering the code is not an option without detailed instructions.

Obviously, the shortcode request above would bypass my problem. By automatically adding everything to cart then moving directly to view the cart one would theoretically never see the price issue.

The page is here



November 16, 2012 at 1:12 am

Hi Gary,

Yes there is a way to redirect the user straight there using this article as a base

[ESPRESSO_CART_LINK anchor="Register for this Event" direct_to_cart=1 moving_to_cart="Redirecting to cart..."]

However that is for when a user clicks the view details and looks at the event, so it may be easiest to amend a template.

What I did was copy the event_list_display.php and event_list.php from the event-espresso/templates folder to uploads/espresso/templates

I then edited the event_list_display.php file to automatically redirect the use to the cart when adding something to cart. Have a look here at line 132, I have highlighted the area I have changed.

Gary Ray

November 16, 2012 at 7:04 am

Thanks for your! I actually found another way to achieve my goal before seeing your post. I ended up creating two short codes and putting them on a page that isn’t the event registration page. They are:

[ESPRESSO_CART_LINK event_id=”1-2-3″ anchor=”If You Are Under 65 Years of Age, Click Here to Register” direct_to_cart=1 moving_to_cart=”Redirecting to cart…”]

[ESPRESSO_CART_LINK event_id=”1-2-4″ anchor=”If You Are 65 Years of Age or Older, Click Here to Register” direct_to_cart=1 moving_to_cart=”Redirecting to cart…”]

This should lower the chances of folks adding the an incorrect item based on their age.

Just because it might be a bug you need to address I will suggest that you take a look at what happens when you have multiple prices for an event. In two of my “events” I have 7 prices. I entered the prices from the lowest to the highest going down the page. When one goes to the “event registration” page the price list is one of the higher prices. I would have thought that the first price in the list would be the one to show up as the price listed.

Thanks again for your help.


November 18, 2012 at 11:10 pm

Hi Gary,

Glad you got it sorted. I’ll make a note re the prices for the dev to look into, thanks for letting us know.

The support post ‘Short code to add multiple events AND view cart’ 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