Hello

Im having problems setting a cookie in PHP (using the Magento platform). The page is at:

http://example.com/step1

When I click on a link here, a iframe opens up. This iframe opens up and is located at:

http://example.com/somewhereelse/index.html

I check a checkbox or I dont. If I check it, a cookie is set to true (lets say whereelse = true) else its set to false (lets say whereelse = false). This works. It sets it to true and false.

After clicking a link, that basically goes to the cart it goes to

http://example.com/step2

But I do not see the cookie at all.

Ive also tried using localstorage and that DOES WORK....but from PHP I cannot access it later.

If more information is needed, please ask and Ill try to put it if known what is asked.

Thank you.

Recommended Answers

All 3 Replies

Im testing local then deploying on shared hosting....

Member Avatar for LastMitch

Im testing local then deploying on shared hosting....

If you do this on your computer you will have trouble with the cookie setting.

Did your read the link I provided? Did you configure it yet?

If you are going to pass data (from the database) into the iFrame once it is open it will work but I don't think it will work on your local host but on your host server.

I have used Magento platform and you have to configure it.

I mean you can keep trying to work around it but I can tell from my experience it's not going to work on your local host (I also read online you can try but it's alot of debugging). It's just much easier if you do in on your host server.

If you can't fixed this cookie issue on your local host then my suggestion do it on your host server. It save you alot of time.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.