Support

Home Forums Event Espresso Premium Register for event goes to view cart, then I get to cart

Register for event goes to view cart, then I get to cart

Posted: April 11, 2013 at 8:10 pm


FriendsOfMNOrch

April 11, 2013 at 8:10 pm

Under the description of my event, I get “register for event.” When I click that I get “view cart.” Is there a way to have “register for event” go straight to the contents of the cart rather than “view cart” appear?


Dean

April 11, 2013 at 11:56 pm

Hi,

It is possible, but depends on how techinical you want to get.

Option 1: Follow this guide here https://eventespresso.com/wiki/multiple-events-registration-use-add-to-cart-link-instead-of-default-registration-form/. You will need to manually change all of your events.

Option 2: Requires some code editing. You would need to comment out or remove the add to cart links and register link and instead add

echo do_shortcode('[ESPRESSO_CART_LINK anchor="Register for this Event" direct_to_cart=1 moving_to_cart="Redirecting to cart..."]');

We don’t really recommend editing files unless you have some coding knowledge.


FriendsOfMNOrch

April 12, 2013 at 7:28 am

We have already tried

[ESPRESSO_CART_LINK anchor=”Register for this Event” direct_to_cart=1 moving_to_cart=”Redirecting to cart…”]

to the end of the event description, and also set “Display registration form?” to “No.” We could try the second option you mention, but all that does is permanently attach the same shortcode to the event.


Dean

April 12, 2013 at 9:25 am

Hi,

Yes the second option just automates the first option. Did you have issues with the shortcode? If so what happened?


FriendsOfMNOrch

April 12, 2013 at 1:55 pm

The short code creates the link in the event description. Clicking “Register for this event” doesn’t redirect us to the shopping cart as expected. Instead, the link changes to say “View Cart,” and nothing else seems to happen. The event is added to the cart, but the redirect isn’t happening.


Josh

  • Support Staff

April 12, 2013 at 2:49 pm

Hi there,

Can you post a link to the webpage where this is happening so we can investigate further?


Tim Monk

April 13, 2013 at 2:24 pm

This is happening on our dev site too. Where do you edit the code?

echo do_shortcode(‘[ESPRESSO_CART_LINK anchor=”Register for this Event” direct_to_cart=1 moving_to_cart=”Redirecting to cart…”]’);

Example is here showing different shortcodes – all when clicked display another link (which I have manually changed to registration) http://vpma-spvs-events.co.uk/?page_id=4&ee=2

Page is changing all the time so will not be there too long!


FriendsOfMNOrch

April 14, 2013 at 6:53 pm

Here is the registration page:

http://www.friendsofminnesotaorchestra.org/event-registration/?ee=2


Dean

April 15, 2013 at 12:34 am

I did some further testing on this and I am also experiencing this issue. It doesn’t seen to be a problem if the shortcode is added to the template via PHP but something is not right when added to an event.

I will get a developer ticket raised on this to look into it.


FriendsOfMNOrch

April 16, 2013 at 7:42 am

Thanks. We’re happy to add the code to the template in the meantime, but we’re not sure which template file to edit, and which lines to comment out. Can you help?


Sidney Harrell

April 16, 2013 at 12:41 pm

I believe it would go into line 48 of registration_page_display.php, right before the switch statement. Remember if moving registration_page_display.php to uploads/espresso/templates to move registration_page.php along with it.


Rania Nazhat

April 26, 2013 at 12:57 am

Hi,

I am also looking to do the same thing.  After selecting add to cart I want the customer to automatically be redirected to the cart page rather than having them select yet another link (too many clicks and it can be confusing to the customer). I’ve put the shortcode in the event description but as stated above, there seems to be some issue with it.  I’m pretty solid with coding but no one has provided in depth detail on how I can edit the template file to add the shortcode function there.  Can someone provide specific details on which file I should be editing, what lines I need to delete and what I should be adding? This seems like a simple feature to implement but I can’t get this thing to work…any help would be appreciated.


Dean

April 26, 2013 at 6:16 am

@Rania – the file depends on where you want the link to go.

If you want it on the event list then it will need to go into the event_list_display.php. If you want it visible on the registration page (some people do as they turn off the registration form there) then it will need to go into the registration_page_display.php file.

These files are found in event-espresso/templates

The files can be copied to uploads/espresso/templates and modified there, so updates do not over write your changes.

Please note if you copy them, you will also need to copy event_list.php and registration_page.php even if you dont modify those files as they are paired files and wont work alone.

echo do_shortcode('[ESPRESSO_CART_LINK anchor="Register for this Event" direct_to_cart=1 moving_to_cart="Redirecting to cart…"]');


Rania Nazhat

April 27, 2013 at 7:12 pm

Thanks @dean Robinson… can you tell me what lines I need to place the shortcode? I am going to be editing the event list display file.


Rania Nazhat

April 27, 2013 at 8:45 pm

Hi @dean Robinson…I added the code to event listing display and I know see the register link. However, now when I click on the link in Chrome, Firefox & Safari it doesn’t redirect to the cart, it only reloads the same page.  In IE it works as it should with an immediate redirect to cart after click.  Am I missing something with the other browsers?


Dean

April 29, 2013 at 3:39 am

@Rania, its very odd that it works in IE but no others. Can you provide a link to an event with the link on it please?


Rania Nazhat

May 3, 2013 at 9:32 am

Hi @dean Robinson… I figured out why it was not working, but I’m still experiencing an issue that maybe you can help resolve.  (I hope I explain this well enough). So the reason the add to cart function was not working is because my site theme uses ajax functionality to load pages/posts.  It automatically puts a “#” in links to keep pages from doing a fresh reload (which is why I chose this theme).

I noticed that when I was selecting the add to cart button on the event listing it wouldn’t add to cart.  It would only refresh that same page.  I’m guessing it was not adding the “#” into the link.  So I had to hard code the link (without the #) to get it to work.

But now my client has a problem with the way the registration process works… We have a music player on the site and now whenever you go to the register page and begin the process, the pages do a new site reload causing the player to start over from the beginning.  Is there a way to change the link structure for espresso to get it to function with the ajax format? Here is a link to the full site so you can poke around and see how it functions seamlessly until you click on any of the “Register” buttons/links/page:  http://stafford-harrisfamilyreunion.com/#/


Dean

May 6, 2013 at 6:33 am

Hi Rania,

I will take some advice from my colleagues on this and get back to you.


Dean

May 6, 2013 at 6:43 am

Hi,

Regarding the AJAX, it isnt something that can be changed very easily in the current version of Event Espresso, it would require an overhaul of the entire registration system.

Looking forward, future versions of Event Espresso may work better with AJAX powered sites, but it is not a guarantee, though we ourselves will be using more AJAX so the possibility is there.

The support post ‘Register for event goes to view cart, then I get to 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