Questions tagged [session]

Denotes questions about session management in Magento.

Filter by
Sorted by
Tagged with
2
votes
1answer
51 views

Session value not set Properly in Logged users Magento 2.3

In my mobile number update module, logged user userId and mobilenumber set to .phtml hidden fields, but some times its not works properly ! please check my code app/code/{vendor}/{module}/Block/...
0
votes
0answers
14 views

Session lost after click Reviews Management in magento 2.2

Now, I using Magento 2.2. When I log in to the backend and click Marketing -> Reviews. After website load grid success. And click edit review or refresh website, then I lost session and website ...
0
votes
2answers
82 views

Magento 2 + Newrelic (slowest components)

I am using Magento 2.2.2 EE and getting slowest component from newrelic. env.php 'session' => array ( 'save' => 'files', 'save_path' => '/var/lib/php7.0/session', ), php.ini ...
0
votes
0answers
15 views

Share PHP session in frontend and REST API (Magento 1.9)

I am writing a few custom REST APIs for Magento1.9 and I was using a session to retain a couple of custom data (It's not a headless architecture). The session was working fine across all my APIs, but ...
0
votes
0answers
10 views

Magento2 Payment js

I have created an apple pay function session.onpaymentauthorized form this function I want to get an event when I add log in function body its ok but when I log as you can see in my code here I did ...
2
votes
0answers
18 views

How to get the data from the Session in a CustomerData Object without breaking the guidelines?

9.10. The Request, Session, and Cookie objects MUST NOT be injected in an object constructor. They MUST be passed only as method arguments. from the Technical guidelines How to comply with this rule ...
0
votes
1answer
18 views

Get session form key in javascript m1

In my product review form the form key fetched from core/session is cached and does not pass the validation upon form submission. So, Mage::getSingleton('cor/session')->getFormKey() and $this->...
0
votes
0answers
18 views

Set Variable to Session in Plugin. Magento2

is there a way to Set a Session Variable in my Plugin? If I do something like this: private $checkoutSession; public function __construct( \Magento\Checkout\Model\Session $checkoutSession ){...
0
votes
0answers
21 views

Magento 1 - Multiple websites share wishlist

How to keep wishlist during a website change? When I switch magento stores the wishlist is well preserved but when I go on a store that is on another website (with different domain) then wishlist is ...
4
votes
0answers
49 views

Magento2: Local-Storage Mage-Storage and Mage-Cache Empty on every Reload

Many features in my web page break as when I investigated, I found out that many local storage keys don't even exist now which used to exist before. list of keys that don't exist: lo_session mage-...
0
votes
1answer
27 views

Magento 1 : Showing chines text in var/sessoin file

Is there any idea about why some file are showing chines text in var/session ?
0
votes
1answer
53 views

Customer name not appearing and products not showing in mini-cart, Magento 2

I have Magento 2.2.6 version. After signin, customer name is not showing on top dropdown bar, however if I reload the page aur goto another page it then appears. Another issue is that when adding ...
0
votes
0answers
50 views

Magento 2.3.1 getting error “Your session has expired” while product added to basket

The strange thing is that this is only happenings on listing pages and not on PDP. I get a 404 on the following js files: pageCache.js addToWishlist.js amazonCore.js I'm running Magento 2.3.1 ...
0
votes
0answers
28 views

Change store view using code when starting session - Magento 2

I want to make a change of store view through code. I have created the next plugin for when the user logs in the system makes a change of store view, but the change is not maintained, I want to switch ...
0
votes
1answer
15 views

How to get quote details in helper

I want to see if there is anything exists in the cart if I am in a phtml page I have tried to use session and cart but I am getting null When I tried to use session I wasn’t sure how to get the ...
1
vote
1answer
34 views

Customer session loggedIn() not working Magento 2

I have to check whether a customer is logged in or not. It only works for My account page and for the rest of the pages, it gives a null result. It was working before. $objectManager = \Magento\...
1
vote
0answers
34 views

How to get custom session in rest api calls?

I have created a custom session and it's storage with custom namespace. I have set some data in storage which I am trying to fetch in my api calls but not getting any data in session. I do get the ...
0
votes
0answers
28 views

Warning: session_regenerate_id(): Session object destruction failed. on Magento 2 Checkout

I have a Magento 2.2.4 running on a Windows IIS server. When entering checkout, I often get There has been an error processing your request error. When I check the error report, it says * ...
0
votes
0answers
23 views

Magento 2 - Call to a member function getId() on null, admin user ID

I have a custom module, and it's work perfectly in the past, and now I installed on a new Magento 2 project. and after that, I add the sample data module, and on setup:upgrade I get this error : ...
1
vote
0answers
108 views

Magento2.2 - - Failed to read session data

If you open the front end with multiple tabs in the browser, the following error is output:. Exception #0 (Exception): Warning: session_start(): Failed to read session data: user (path: /var/opt/remi/...
1
vote
0answers
35 views

Magento 1.9.4.0 order not creating

I have been working on integration of a payment gateway with Magento 1.9.4.0 it works perfectly and the orders are being created successfully. However, there is a case when the user tries to login ...
4
votes
2answers
155 views

Magento 2 products in cart from other session

Strange behavior in Magento 2.2.8! When I leave the page for a few minutes and then do a refresh, products from other user sessions are in my cart! 20 minutes refreshing and there are 17 products in ...
1
vote
0answers
38 views

Magento 2 Remove cart content when user log-out | Empty cart when logged back in

Correct me if I'm wrong, but completely removing the cart content on customer log-out is not native to Magento 2 is it? I read about the "Persistent cart" but it seems to work only for removing the ...
0
votes
1answer
50 views

Magento 2 Session getting reset after placing order

Can anyone help me with this? I want some information from the session after order is placed. I tried customer session and even my own new session but after placing order am bot getting anything in ...
1
vote
1answer
24 views

how can we access customer session in checkout

I have one special field called some_id in customer data and I want to save the some_id and quote_id in database. I am using sales_quote_save_afterevent to save both ids. But my customer session is ...
0
votes
1answer
97 views

Magento 2.2.2 - Warning: SessionHandler::read() No space left on device

My application is showing error: Magento 2.2.2 - Warning: SessionHandler::read() No space left on device (28) in /var/www/html/vendor/magento/framework/Session/SaveHandler/Native.php on line 22 I ...
2
votes
0answers
42 views

Magento 2 Increase guest session time and keep the items in cart for 20 days

I want t increase guest user session time in magento. If guest user add to cart and just go for lunch or any other activity putting his/her website open in browser, when user come after 5-6 hours ...
0
votes
0answers
100 views

Magento 2.3: get cart items inside the cron file

I want to get current quote data for cronjob in cron/run.php But my code it's not working. Magento2 version is CE 2.2.6. Here is my code <?php namespace ABC\Abandon\Cron; use \Psr\Log\...
2
votes
0answers
31 views

Set Lifetime Session but Around a Week Expired Session--AGAIN and AGAIN in Magento 2.2.4

i want to set lifetime session but after around 1 week session has expired session.gc_maxlifetime 31536000 and Adding admin/security/session lifetime to 31536000 in core_config_data but still ...
0
votes
0answers
25 views

Magento 2.2 - Session not working on Helper Class

public function add($productId, $data) { $this->_customerSession->setData('customData', $data); } private function hasData($productId, $side) { return $engraving = $this->...
0
votes
1answer
90 views

Can't access frontend Magento 2

I can't access the frontend of my website, and when I look at the error report it gives me the following message: Session data file is not created by your uid I can access the admin panel without ...
1
vote
1answer
141 views

Session error in magento2

I am getting an error like this in the site. How can I resolve it? I am using Memcache for session storage. My Magento version is 2.1.15 Warning: SessionHandler::read(): Unable to clear session ...
1
vote
1answer
26 views

Magento2.2.5 : How to maintain a session value in product detail page to custom controller page?

I implemented some custom options in the product pdp page. i.e, i have to engrave the product in frontend(eg.pendant FRONT SIDE) as well as the backend(eg.pendant BACK SIDE) without refreshing the ...
2
votes
0answers
166 views

Magento EE: session_start(): Unable to clear session lock record

Magento Enterprise Edition 1.14.0.1 PHP 7.2.15 PECL memcached extension 3.1.3 We encountered this problem upgrading Magento EE from PHP 5.6 to PHP 7.2. We do not see the problem using the memcached ...
0
votes
0answers
49 views

Magento 2: How to load another customer data on checkout instead of current logged in customer via custom module?

I want to show a customers list as dropdown on checkout page and when I change the customer from that dropdown list, All details like shipping addresses, customer detail should be change according to ...
2
votes
1answer
125 views

customer first name and last name separately (Magento 2)

I am trying to get First Name and Last Name from the session. But I am not able to get First name or last name. Instead, I am able to get the full name. $objectManager = \Magento\Framework\App\...
1
vote
1answer
78 views

503 error only when customer logs in (Magento 1.9.4.0)

Website works fine until a customer logs in and then they are presented with a 503 error when they browse to any category or product. The actual account page does appear fine once they are logged in. ...
1
vote
1answer
66 views

How to get custom session value in javascript set through Magento\Framework\Session\SessionManagerInterface?

Following program is used to set value of custom session variable country. <?php namespace Vendor\Module\Controller\Index; use Magento\Framework\App\Action\Context; use Magento\Framework\App\...
2
votes
1answer
46 views

Users on IE and Edge have to log in twice on Magento 2 store

I was tasked on fixing JS console errors and browser testing for a Magento site that someone else developed (I assume the original developers quit). I got this finished, but now I am encountering a ...
3
votes
0answers
1k views

Your session has expired magento 2.3 [closed]

when i want add to cart product it showing error Your session has expired how i solve this problem.
1
vote
0answers
29 views

How to pass SID to url?

I see here many questions how to remove SID. It seems this is not very rare. How that even happen? Even if php ini settings for session.use_trans_sid is true and Magento setting Use SID on Frontend ...
0
votes
0answers
365 views

Magento 2 Fatal error: Uncaught Error: Call to undefined method Magento\Framework\Session\SaveHandler\Native::write()

I've been getting this error when I tried to access my project: Fatal error: Uncaught Error: Call to undefined method Magento\Framework\Session\SaveHandler\Native::write() in C:\xampp\htdocs\...
1
vote
0answers
32 views

Customers receiving order confirmation with another customer's details

We recently upgrade out Magento 1.9.0.1 site to the latest patches through to SUPEE-10975. We have started seeing a number of problems like so; Some backend orders show customer email address and ...
3
votes
3answers
367 views

How to increase user Session time in magento 2.2.2?

I have tried to increase session time, cookies time from admin panel And php.ini file. But both ways are not working for me. Still, the session expires in 30 mins. I want to make it for a day.
0
votes
0answers
15 views

Magento 1 change session serialization from php to json

I'm a programmer new to Magento. I want to access the session objects (stored in redis) from other systems. Unfortunately the php serilization is not well documented so libraries in other languages ...
0
votes
1answer
83 views

Override core files in Magento 1.9.4 (Varien.php)

What would be the most appropriate structure of the module in order to rewrite function validate() at app/code/core/Mage/Core/Model/Session/Abstract/Varien.php The idea is to rewrite that block ...
0
votes
0answers
60 views

How to solve intermittent exceptions in the Zend Framework's SessionHandler?

this is my first question at this forum! Circumstances are M2 2.2.7 on CentOS 7 with PHP 7.1 + all 3 types of caches managed by Redis 3.2.12 (on instance per type of cache). MySQL 5.latest and a ...
0
votes
1answer
37 views

How to render login error message in product page?

If a user tries to login with wrong credentials then normally a message appears which says "login failed", it works if I do it on the normal login form at /customer/account/login/ But if I am at a ...
0
votes
0answers
19 views

Magento 2: What is the best practice of storing and retrieving custom data

Looking for some input on what the best practice would be to store and retrieve custom data. As an example, I need to store, retrieve and update a couple of custom variables: access_token and ...
0
votes
1answer
138 views

Magento 2.2.x: Persistent Checkout can't be disabled

The problem is even when i disable the "persistent checkout", it still work as normal. Its a magento default module, so i think this is a magento 2 bug. After a day working on this, i still don't ...