Support

Home Forums Event Espresso Premium Return to event cart not returning to editable cart from Registration page

Return to event cart not returning to editable cart from Registration page

Posted: December 28, 2018 at 1:39 pm


lisa burgess

December 28, 2018 at 1:39 pm

Hi,

I am using EE4 and Multi-event registration so that when people add our event to the cart, they have the ability to update, add/remove qtys.

I have found that when I am on my “Registration Checkout” page, (this is where I have the ability to add/subtract event tickets) and then click on the button “Proceed to Registration”, the “Return to event cart” button no longer brings me back to an editable cart.

Instead, when I click on the “Return to event cart” button, it seems to now be linked like an anchor to the top of my page where there is a “non-editable” version of my cart above the registration fields for the event attendee.

*I notice that when I hover over “return to event cart” from my registration page, it adds a string to the link like this: ?uts=1546029283. So instead of the link being: /registration-checkout/?event_cart=view#checkout –> instead, it looks like this: registration-checkout/?uts=1546029283&event_cart=view#checkout

If I hit the browser’s BACK button, I can return to the actual cart page where the qtys are editable.

What could be going wrong with the “Return to cart” button?

THank you,
Lisa


Josh

  • Support Staff

December 28, 2018 at 3:32 pm

Hi Lisa,

Are there any “security” plugins activated on the site? The reason I ask is because sometimes those can filter long URLs. The UTS part of the URL is there for working around potential caching issues and doesn’t prevent the event_cart=view URL parameter from working.


lisa burgess

December 28, 2018 at 3:48 pm

This reply has been marked as private.


Josh

  • Support Staff

December 28, 2018 at 4:16 pm

Hi Lisa,

I see what you mean, but this isn’t an issue on any of my testing sites. So there may be another plugin that’s affecting your site so it doesn’t properly redirect to the cart. You’ll note that the URL works OK if you force it to open in a new window or tab.


Tony

  • Support Staff

December 28, 2018 at 5:21 pm

Hi Lisa,

It looks like your theme has some JavaScript that overrides the default behaviour for links on the page.

Normally the browser would reload the page with these either of these:
{domain}/registration-checkout/?event_cart=view#checkout
{domain}/registration-checkout/?uts=1546029283&event_cart=view#checkout

However, your theme has some JavaScript that checks if the domain matches and the page is the same as the current page, the link contains an anchor (#checkout) anywhere within it and the current page has that anchor it just scrolls to it, which is why you don’t see the cart.

It’s the code within {theme}/assets/scripts/min/theme.min.js

I’d recommend contacting the theme author regard this and ask them to prevent this from happening, the code in question is:

o('a[href*="#"]').not('[href="#"]').not('[href="#0"]').not('[href*="#tab-"]').click(function(e) {
        if (location.pathname.replace(/^\//, "") == this.pathname.replace(/^\//, "") && location.hostname == this.hostname) {
            var s = o(this.hash);
            (s = s.length ? s : o("[name=" + this.hash.slice(1) + "]")).length && (e.preventDefault(),
            o("html, body").animate({
                scrollTop: s.offset().top
            }, 1e3, function() {
                var e = o(s);
                if (e.focus(),
                e.is(":focus"))
                    return !1;
                e.attr("tabindex", "-1"),
                e.focus()
            }))
        }
    })


lisa burgess

December 28, 2018 at 7:17 pm

Wow Tony, thank you so much!

I was going through all the plugins and came up empty, and then decided to switch themes to see if the theme was the culprit. Sure enough! But I had no idea why. Thank you for uncovering this!!!

Lisa


Tony

  • Support Staff

December 31, 2018 at 5:31 am

Your most welcome, Lisa.

I’ve seen another theme do something similar so had an idea on where to start 🙂

The support post ‘Return to event cart not returning to editable cart from Registration page’ 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.

Support forum for Event Espresso 3 and Event Espresso 4.
Documentation for EE3 and EE4
Documentation for Event Espresso 3

Documentation for Event Espresso 4

Status: closed

Updated by  Tony 5 months, 2 weeks ago ago

Topic Tags

Tagged: 

Notifications

This topic is: not resolved
Do NOT follow this link or you will be banned from the site!