Streaming live at 10am (PST)

Which cookies is the e-commerce shopping cart cookie?

Hi,

Does anyone know which cookie handles the shopping cart items ?
I guess it’s one of those 4

But I’d like to be sure to remove the right one.

Details on the objective :
I’d like to create an “empty shopping cart” button. I’m thinking of a little javascript like this one >

<script>
$('#emptycart').click(function(){
    document.cookie = 'COOKIE-NAME=; expires=Thu, 01 Jan 1970 00:00:01 GMT; Domain=.XXX.com; path=/';
    window.location.href = "www.XXX.com";
});
</script> 

Anyone tried that before ?

Ok, so I’m answering my own but in case anyone was wondering :

• wf-order-id —> is the cookie handling the shopping cart
• No, you can’t play with this cookie, because it’s HttpOnly and therefore unaccessible with javascript. Fortunately in terms of security, unfortunately if you’d like to improve some stuff > forget about home-made empty cart buttons for instance…

Hope this helps anyone who was wondering

1 Like