We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [cookie]

Denotes a question related to the Browser cookie.

Filter by
Sorted by
Tagged with
1
vote
1answer
55 views

Cookie restriction mode not working

I'm using magento 1.9 and I'm trying to set up the cookie restriction mode to display the cookie notice. I have everything enabled and appears set up correctly but the cookie notice doesn't display, ...
0
votes
1answer
101 views

Magento 2 cookies not saved correctly and deleted sometimes

I have strange behaviour in Magento 2.2.4 and also 2.2.5. If I add a product to cart it is saved correctly and minicart shows 1 product. Then I add another product and first added product is lost in ...
2
votes
1answer
2k views

Magento 2 Cookie for specific domain without extra dot

I am trying to set the cookie for the specific domain(as I have multiple websites and I don't want to share them) so for this, I changed the configuration as OOTB Magento provides this feature (Stores ...
0
votes
0answers
132 views

Magento 2 store switcher - store cookie not changing because of full page cache

I have a Magento 2 site with a basic store switcher that lets the user switch between 2 stores using the URL method (e.g __store=default). When I have FPC enabled, the cookie that sets the current ...
2
votes
0answers
44 views

Cache System and Cookie reading Magento 1.9

In the header.phtml I have a DIV which gets visible only when a cookie is NOT set in the browser. <?php if (Mage::getModel('core/cookie')->get('cookiex') == '') { ?> <div></div&...
1
vote
1answer
304 views

M2 > Recently viewed cookie lifetime

In magento 2.2.5 I added a recently viewed widget block that way: <block class="Magento\Catalog\Block\Widget\RecentlyViewed" name="category.recently_viewed" template="Magento_Catalog::product/...
4
votes
0answers
193 views

Missing HTTP flag and Secure flag on form_key and mage-messages

As per my security checking and testing in Magento 2.1, I see that secure cookie or HTTP only flag not set on form_key and mage-messages.For the security reason, we need the cookie to be secure. Can ...
1
vote
1answer
69 views

Magento2 : delete core cookies programmtically

What is the similar code in Magneto2 to delete core cookies? $cookies = Mage::getSingleton('core/cookie')->get(); foreach($cookies as $cookieName) { Mage::getSingleton('core/cookie')->...
0
votes
2answers
485 views

Cart stays empty if cookies are not deleted

For some reason people can't put things in their cart, the issue is fixed once you clear your cookies. Problem is: we're getting reports from a lot of customers that they can't add things to their ...
2
votes
1answer
1k views

Magento 2 : How to set secure cookie OR HTTP ONLY FLAG SET

As per my security checking and testing in Magento 2, I see that secure cookie or HTTP only flag not set on the Magento 2. For the security reason, we need the cookie to be secure. Can someone please ...
1
vote
0answers
743 views

Magento 1.9 : Cookie restriction mode not working

I activated the cookie restriction mode in the backend & cleared all caches. The CMS static block called "cookie_restriction_notice" is activated too. But there is no overlay showing up. I also ...
0
votes
2answers
3k views

Edit the default Magento2 cookie message

I would like to change the text and button value of the Mage2's default cookie policy popup. See how it looks now: https://imgur.com/a/qvqAGXb I would like it to read some different text and have a ...
3
votes
1answer
97 views

Magento 1 : Customers can't login, cookie issue

Some customers report that they can't log in on the frontend, even with a correct password. I've seen it happen sometimes, the page just reloads with no error messages. Deleting the cookies solves the ...
2
votes
1answer
72 views

After changing cookie path, customers where unable to login in account and checkout page

I've just changed cookie path settings in magento admin. After this, on storefront, I'm unable to login as customer or on checkout page (on checkout page it redirects to empty cart). However if I open ...
2
votes
1answer
883 views

Magento 1.9.3.8 Actual purpose of Cookie Restriction mode?

Hi guys I have enabled the cookie restriction mode in my magento installation, but cannot gather the purpose of this mode. it displays a banner for users to accept, but actually doesn't look to be ...
1
vote
1answer
504 views

Magento 2 : Cookie Security: HTTPOnly not Set for customer id

While Customer login in magento 2 system . We are setting cookie against Customer and cookie has been set but when are checking cookie in browser location where HTTPONLY is showing False that reason ...
1
vote
0answers
229 views

Full page cache issue with cookie in M2

I have set cookie value using onclick event. At page load i want to check cookie value so have create module as explained in this How to add Cookie Magento 2? url. everything is working properly but ...
1
vote
1answer
100 views

Translate Magento Admin config settings to config.php settings

I want to modify a setting, which I know how to find and change in the Magento Admin, - but I want to modify it in the config.php file. Which way can i find out the configuration path / syntax within ...
1
vote
0answers
249 views

Magento 2 cookie is not set on homepage

I'm trying to set a new cookie the same way the store cookie is set. I use the following plugin: <type name="Magento\Framework\App\FrontController"> <plugin name="homepage_plugin" ...
0
votes
1answer
916 views

Cookie displaying popup again and again Magento-2 [duplicate]

As no one helped me before. That's why I am asking again for help in creating a cookie that help to display popup only one time. What should I change in this script so that it displays popup only one ...
0
votes
1answer
629 views

Magento 2 Cookies break login on subdomains

I have a magento 2 install running on domains like this: site.com business.site.com If you go directly to the subdomain you can login without issues but if you visit the primary domain at all ...
1
vote
1answer
841 views

Setting cookie on login

So I've installed a new chat for my website but need to do one last thing, and that is to set a cookie on login, and delete it on log out. Code I'll be using for login: setcookie('cc_data',$userid, ...
1
vote
1answer
93 views

Login to admin after second attempt only

Can't figure out a strange issue. When I access to site.com/admin and enter access credentials, Magento redirects me to the login page again. If I refresh the page or enter login credentials again, ...
0
votes
1answer
776 views

Magento 2 How to get Cookie value in Block

I didn't get the Cookie Value in any block or phtml file. This is the code: Extra.php (Block File) <?php namespace Websource\Quotation\Block; class Extra extends BaseBlock { const COOKIE_NAME ...
1
vote
0answers
21 views

Customers not able to login intermittently

I am using Magento 1.13.1.0, and getting this issue appearing differently on different browsers. On Chrome, customers are not able to logged in at all. On Opera, Customers are able to logged in but ...
1
vote
1answer
75 views

Why do i have to always run the commands to clean cache in Magento 2.1.8?

Whenever I make any change to CSS of my Magento store, it doesn't seem to be updated. I also tried to clean the cache from the Magento admin dashboard but it didn't work. Now I always have to run ...
11
votes
1answer
829 views

Magento2: Minicart is full while Cart is Empty

A lot of our customers are complaining that they add stuff to the cart & then when they proceed to checkout they are redirected to an empty cart. We thought that it might be a result of too short ...
0
votes
1answer
71 views

Magento : Custom login form in Magento, redirecting back to some customers

I have created a custom login form for an app created in Magento some time ago. Everything worked fine until now. Some of the customers are redirected back to the login form after the login process - ...
1
vote
1answer
1k views

Set cookie in Magento2?

Mage::getModel('core/cookie')->set('visitor_id', $visitorId, $this->_getExpiryTime(), '/'); How to convert this code into magento2? I have trying this: $this->_cookieManager->setCookie(...
1
vote
2answers
478 views

how to set custom function to cookie in magento2?

How to set uniqid in cookie in Magento2? public function generateVisitorId() { $visitorId = $this->_checkoutSession->get('visitor_id'); if (!$visitorId) { ...
0
votes
1answer
32 views

Registration is broken after switch to HTTPS

We switched our shop from HTTP to SSL / HTTPS. After that, the user registration is broken. When you type in your data and click at "register", you are re-directed to the registration page without ...
0
votes
1answer
166 views

Seeing duplicate cookie response headers

When looking at the request headers for my Magento 1 site I can see it has 2 cookie request headers. Set-Cookie:frontend=3dt1aedashghghg1vr9ua0tghms7; expires=Fri, 20-Oct-2017 07:52:20 GMT; Max-Age=...
1
vote
1answer
503 views

Set cookie lifetime in phtml

I want to set the cookie lifetime in my phtml file. I am using the following code: $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $cookieManager = $objectManager->get('...
1
vote
1answer
2k views

How to set a mage/cookies cookie expiration date to the user's session

Default jQuery method In my JS (loaded using Require JS) I'm setting a cookie like so: $.cookie('hideStickyBanner', 1); This sets a cookie with the expiration date of session which is exactly what ...
8
votes
2answers
3k views

Unable to send the cookie. Maximum number of cookies would be exceeded Magento 2.1.5

Every time I open var/Repots in magento 2 website, I found hundreds and thousands of error files all having the same message: a:4:{i:0;s:71:"Unable to send the cookie. Maximum number of cookies ...
0
votes
1answer
404 views

Update Unsecure, Secure, and Cookie URLs in phpMyAdmin from Production to Staging

I'm looking for a way to quickly update all unsecure, secure, and cookie domain URLs through phpMyAdmin. My situation is to change unsecure & secure URLs (I use always-on HTTPS) from ...
1
vote
1answer
4k views

Magento 2 Get Session ID and make cart accessible from anywhere

I need to make the cart page accessible to an external user? In Magento 1 I had this in my Controller: class Sostanza_Livehelp_IndexController extends Mage_Core_Controller_Front_Action { ...
0
votes
1answer
156 views

Magento 2 Cookie Restriction Bar - css styles not applied for different stores

I am working on a Magento 2 multistore setup like this: www.foo.com/uk www.foo.com/us bar.foo.com/uk bar.foo.com/us baz.foo.com/uk baz.foo.com/us I have successfully styled the cookie bar for the ...
0
votes
1answer
153 views

M2 - Forget selected shipping method

I'm working on the Checkout page and I noticed that, as a logged-in customer, Magento 2 will remember the Shipping Method you selected the last time you placed an order (for example: "Flat Rate"). ...
0
votes
2answers
296 views

Newsletter Popup Submitting But Not Closing

It was working when I first installed it. Now I'm finally ready to try to use it it's not completely working. It Submits the form and it registers in magento backend in the newsletter subscribers but ...
1
vote
2answers
395 views

M1: cookie issues in example.com and staging.example.com

On a shared machine, I have two sites running: example.com and staging.example.com. I have a problem where I can't log into the staging admin due to cookie issues. If I clear all the cookies, I can ...
2
votes
2answers
4k views

How to get Cookies already set on the browser

I have cookies already set on the browser, name as cookie_name. And how can I use magento 2 cookies manager. to retrieve the cookie already set on the browser. <?php namespace YourCompany\...
0
votes
1answer
541 views

Where can I change the value for direct_url privacy-policy-cookie-restriction-mode?

Although I can edit the cookie_restriction_notice_block to change the link to the relevant Privacy Policy page I would like to be able to change the value of {{store direct_url="privacy-policy-cookie-...
0
votes
0answers
314 views

Secure session cookie frontend

How do I enable the frontend secure session cookie? Is there a setting to enable this?
1
vote
0answers
1k views

M2: Issue with mage-messages cookie

After updating Magento Framework to 2.1.7, none of the flash messages (success, error, notice ..) are show on frontend, which is making very difficult for user to understand what has happened after ...
0
votes
1answer
769 views

Subdomain Cookie

I have a problem with my subdomain in Magento 2.1.6. The user session is not kept between websites. My websites are like this: sub1.market.com sub2.market.com www.market.com I set the cookie ...
4
votes
1answer
2k views

Mage.Cookies what for?

We are thinking about removing the js.phtml from our template and I can't find a reason why not. What is Mage.Cookies for and were is it used? Did I oversaw anything?
1
vote
1answer
298 views

Magento 2 saving cookies works only on backend

I have followed this question on how to do cookies in Magento 2, and it works, except the cookie doesn't save when I'm on frontend. However it reads well on frontend if it already exists. I have tried ...
7
votes
1answer
290 views

Multiple cookies for CUSTOMER_SEGMENT_IDS when placing order

During the Ajax call to submit order in one-page checkout process, I'm getting cookie "CUSTOMER_SEGMENT_IDS" multiple times, with "Deleted" as value. This is causing header size to go much beyond the ...
6
votes
3answers
6k views

How to set cookie in magento 2?

I need to set a value to the cookie in a phtml file and I need to get it's value in another phtml file. Is it possible to set and get the values using jQuery?