Refresh the basket programically

Hi Snipcart Team,

I’m setting up a dual shopping basket on my Snipcart-powered site by managing the basket GUID in the snipcart-cart cookie. When I switch between baskets (e.g., Fresh and Frozen), I update the GUID in the cookie.

However, after updating the GUID in the cookie, I want the cart to update its contents without requiring a full page reload.

I have tried dispatching the snipcart.cart.updated event after modifying the cookie like this:

const event = new CustomEvent(‘snipcart.cart.updated’);
document.dispatchEvent(event);

But the content in the cart doesn’t update until I refresh the entire page.

Is there a way to automatically refresh the cart items or trigger Snipcart to reload the cart content without reloading the entire page?

Thank you for your help!