Cart canvas close button doesn't work properly

Hi there,

I am having issues with my cart canvas element. When I add the product to my cart the cart canvas opens, WHICH IS OK! BUT when I click on the “X” (Close) button it doesn’t close at the first time but I have to click 2 times on it.

How can I fix this issue?

Please watch the video down below:

Hi Katarina,

I have checked the given URL and found that the Cart Canvas is closing by clicking the close button single time. If you are still getting the issue, I would suggest you check once by clearing type cache including the Style Cache from Cornerstone > Settings > System > Clear Style Cache and check in the incognito/private mode of the browser.

Hope it helps.
Thanks

1 Like

Hi Tristup,

Yes, the Cart Canvas CLOSES by clicking the close button a single time when you directly click on the header cart canvas element. :+1:

BUT THE ISSUE IS:

When you ADD a product to the cart and cart canvas opens, THEN the close button needs to be clicked 2 times. As you saw below in the video I have sent.

How can I fix this issue, please?

Kind regards,

Hi Katarina,

I have checked your website again by following the steps and found that another modal is overlaying the Cart Canvas which is getting closed while you click the first time. I would suggest you check that modal, and set the ordering of the modal to get rid of this issue.

Hope it helps.
Thanks

1 Like

Hi Tristup,

Thanks for your reply,

Regarding the “Another Modal overlaying Cart Canvas.I really don’t know how to fix that issue.

Could you help me with that, please?

This is an emergency fix since I am planning to do a website update, so hopefully you can help me out with this! I would be really grateful

Kind regards,
Kate

Hello Kate,

The staging site is under construction and we cannot get passed to the login url. It only redirect us to a blank page whatever we do or in any URL that we tried.

Thank you.

To access the website please log in to the site using this link:

Hello Katarina,

We can see the you were using One Service and our staff gave this custom JS code:

jQuery(document).ready(function($){
    $('body').on( 'added_to_cart', function(){
      	        $('#add-to-cart-open-anchor-toggle').trigger('click').addClass('x-active').attr('aria-expanded', true);
     		$('#add-to-cart-open-off-canvas').addClass('x-active').attr('aria-hidden', false);
    });
});

Based on this thread: Open/close modals, your custom JS code needs to be updated.

See the secure note for more details.

Kindly let us know how it goes.

1 Like

Hi Ruenel,

Thanks for investigating further about this!

It works perfectly as I wanted it to… I’m so happy :slight_smile:

Just one thing regarding the code you sent:

  • Is there a specific reason you added the “Delay”? Since I want it to work instantly if possible
  • Also in the code, why is there an empty space? This: https://prnt.sc/26h58cn

All the best,
Kate

Hello Kate,

The empty line is just to separate the commented code from the working code. You can also remove the delay if you want it too.

Best Regards.

1 Like

Thank you so much Ruenel! I love u <3

It works perfectly now!

All the best,
Kate

You are most welcome Kate.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.