Setting and recalling a cookie

Hi there!

I want to set up a e-commerce store where customers can place orders via a reseller.

What I have done:
The resellers are a collection list, if I go on the cms collection page of a reseller I see the shop.

What I struggle with:
If a customer coming from a cms collection page of a reseller I want the checkout to know from which reseller csm collection page the customer came from. I have tried to set a cookie in the reseller cms collection page:

document.cookie = "Reseller=Name";


(Name is linked to the name of the collection page)

And I wanted to recall that cookie in the notes additional information box in the checkout:

window.onload = function WindowLoad(event) {   
    document.getElementById('Notes').value = document.cookie;

It shows me three cookies (stripe and WF) but not the cookie that I set beforehand which should include the name of the reseller.
Do you know what am I doing wrong here?


I have an issue that is slightly different but it might shed some light on your problem.

In my case, I have an onload cookie that works on all my pages but not on my collection page. So it might not be the CMS itself that is the issue, but rather the collection page.