Not able to set cookie in observerMagento Cookie Value Not SetMagento set Cookie?How to Set Session Cookie Based on Query-String Param in MagentoDev/Staging/Live Cookie Domain For Non-www SitesCookie issue with Internet ExplorerM1: cookie issues in example.com and staging.example.comcron observer vs controller action memory issueForm Key cookie is set twice - Magento 2.2.4Listener when message is set in Magento 2Magento 2: Not getting set cookie value in RegisterTrackingObserver
Why would someone open a Netflix account using my Gmail address?
Could there be something like aerobatic smoke trails in the vacuum of space?
God-Pharaoh's Statue and Finale Of Promise
Can a tourist shoot a gun in the USA?
Is the seat-belt sign activation when a pilot goes to the lavatory standard procedure?
APFS - how do I enable transparent compression
Is random forest for regression a 'true' regression?
Formal Definition of Dot Product
How to handle professionally if colleagues has referred his relative and asking to take easy while taking interview
Is my test coverage up to snuff?
How to not get blinded by an attack at dawn
What do you call the hair or body hair you trim off your body?
Why would company (decision makers) wait for someone to retire, rather than lay them off, when their role is no longer needed?
labelled end points on logic diagram
Why can't I share a one use code with anyone else?
Will the volt, ampere, ohm or other electrical units change on May 20th, 2019?
Slice a list based on an index and items behind it in python
Does this "yield your space to an ally" rule my 3.5 group uses appear anywhere in the official rules?
What dog breeds survive the apocalypse for generations?
Is there an academic word that means "to split hairs over"?
enumitem: Understanding the usage of asterisk and exclamation mark in setting the different lengths
Promotion comes with unexpected 24/7/365 on-call
Holding rent money for my friend which amounts to over $10k?
With today's technology, could iron be smelted at La Rinconada?
Not able to set cookie in observer
Magento Cookie Value Not SetMagento set Cookie?How to Set Session Cookie Based on Query-String Param in MagentoDev/Staging/Live Cookie Domain For Non-www SitesCookie issue with Internet ExplorerM1: cookie issues in example.com and staging.example.comcron observer vs controller action memory issueForm Key cookie is set twice - Magento 2.2.4Listener when message is set in Magento 2Magento 2: Not getting set cookie value in RegisterTrackingObserver
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I am trying to set a cookie on the observer "catalog_controller_category_init_after" but it does not create the cookie but when I do exit after set cookie it will create cookie after I remove exit from code and run the same code cookie still remains on browse but after I clear the browser cookie and run the same code without exit it will not create a cookie. even tho I tried to set a cookie on the controller and phtml file same thing will happen.
magento2 event-observer controllers cookie
add a comment |
I am trying to set a cookie on the observer "catalog_controller_category_init_after" but it does not create the cookie but when I do exit after set cookie it will create cookie after I remove exit from code and run the same code cookie still remains on browse but after I clear the browser cookie and run the same code without exit it will not create a cookie. even tho I tried to set a cookie on the controller and phtml file same thing will happen.
magento2 event-observer controllers cookie
add a comment |
I am trying to set a cookie on the observer "catalog_controller_category_init_after" but it does not create the cookie but when I do exit after set cookie it will create cookie after I remove exit from code and run the same code cookie still remains on browse but after I clear the browser cookie and run the same code without exit it will not create a cookie. even tho I tried to set a cookie on the controller and phtml file same thing will happen.
magento2 event-observer controllers cookie
I am trying to set a cookie on the observer "catalog_controller_category_init_after" but it does not create the cookie but when I do exit after set cookie it will create cookie after I remove exit from code and run the same code cookie still remains on browse but after I clear the browser cookie and run the same code without exit it will not create a cookie. even tho I tried to set a cookie on the controller and phtml file same thing will happen.
magento2 event-observer controllers cookie
magento2 event-observer controllers cookie
asked May 10 at 14:41
nikunjnikunj
11
11
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f274197%2fnot-able-to-set-cookie-in-observer%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f274197%2fnot-able-to-set-cookie-in-observer%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown