Questions tagged [customer-session]

Denotes questions regarding Magento customer session.

Filter by
Sorted by
Tagged with
0
votes
0answers
13 views

SOAP - customer logged in, but can't see cart

I use SOAP and the customer's email address to log the customer into the shop system. This is successful. If I now add a product to the customer's shopping cart via SOAP, it will be forwarded to the ...
0
votes
0answers
19 views

Session not set in PHPSESSID Cookie when FPC is enabled

I am trying to pro-grammatically log in using the SID. The front-end already shows me that I am logged in, but as soon as I go to a page that needs a logged in user (ex. account page) I am not ...
0
votes
1answer
38 views

Magento 2.3.3 - Varnish session issue

I'm having a bug with the Varnish Caching and after investigating and searching for a solution, I'm still not able to solve the problem. The FPC is working fine most of the times, but sometimes the ...
0
votes
0answers
9 views

Not get logged in chrome.302 status came

I am not able to login in Chrome but able to login Firefox,Internet Explorer.I have added session time 24hrs from admin settings.Also tried with core varient.php file session code commented, but no ...
1
vote
1answer
21 views

Magento 2 - Increase customer session timeout for inactivity

Customer gets logged out after 30 mins of inactivity. I want to increase it to 1 hour. Any idea how to that?
0
votes
4answers
38 views

Magento 2.3.2 How to redirect customer on login page if he hit custom customer dashboard link in browser without login?

I have created customer dashboard custom tab and the path is 'inquiry/customer/' which is working fine. Issue is that If the user hit the direct that url in the browser without login in his account ...
1
vote
0answers
11 views

How to conditional show content by customer group

I have a function to get the customer group ID and in my phtml file if it equals the customer group id I show content. The issue is that when I test it in a production environment the content doesn't ...
0
votes
1answer
31 views

How can I get all quote which is active with customer ID

Is there anyway I could print out in a table in phtml the following: Entity_id , is_active and store Is it possible to get all active quote within a customer_id? I want to show this in a table I ...
0
votes
2answers
66 views

how to change customer session data in Magento 2?

after customer login, I want to change some of the session params like customer name. I do like this $this->_customerSession->getCustomer()->setName("ddddddd"); also i tried this $this-&...
0
votes
0answers
13 views

Magento2.3.3 fresh installation getting error customer-data.js [object Object] only in firefox

With Magento 2.3.3 fresh installation without any modification I am getting error at console customer-data.js [object Object] This happens only in Firefox and not in Chrome. Tried flush and reindex ...
0
votes
0answers
15 views

Magento 2 add a button in customer edit in admin

I want to add a button in customer edit page in admin I want to click the button and call what’s in my block But I don’t know how to do this In my block for now I called getValue()
3
votes
0answers
30 views

How to retain customer login after switching website in Magento 2.3?

I have a website switcher button on my Magento 2.3 site (not a store switcher). When a customer logs in on the website - abc.magento.com, I programmatically switch the website to pqr.magento.com, it ...
1
vote
1answer
43 views

How to show Block depending on Customer Logged In/Out in Magento 2

I want to Show Conditionally Depend of customer logged in status For Magento 1 i Found this Solution i want Same Lopic for Magento 2 // is Logged in <customer_logged_in> <reference ...
0
votes
0answers
18 views

Magento 2 All other sessions are automatically closed after a password has been changed by the customer

The customer is logged in on different devices or browsers at the time customer changes his password then all other sessions are automatically closed after a password has been changed but other ...
0
votes
2answers
19 views

Trouble in getting in customer data using block class

I'm having trouble in getting the customer details using block class. I want to show the customer name after he/she logged in using block class. I can do it via object manager but not through block. ...
2
votes
2answers
56 views

Magento 2 : \Magento\Customer\Model\SessionFactory $customerSession is not working with FPC

If we need to get current customer sessions in a block, cacheable must be set to false in the layout XML. I am using \Magento\Customer\Model\SessionFactory $customerSession in my block but it is not ...
0
votes
1answer
75 views

How to get customer session data outside Magento

I want to know if it is possible to get customer session data outside of magento2 <?php error_reporting(E_ALL | E_STRICT); $mageFilename = 'app/Mage.php'; require_once $mageFilename; $app = Mage::...
0
votes
0answers
25 views

Implementation of session based authentication for API in Magento 2

Actually I am trying to create a check over custom customer attribute for example: if($customer->IsPartner() == TRUE){ return $token; } else{ return "Access is allowed to ...
0
votes
1answer
42 views

Magento2: Admin dashboard is suddenly logout some times

when I login to the admin dashboard, after some seconds admin is logged out and redirects to the login page. What is this issue?
0
votes
0answers
20 views

Firefox TypeError: options is undefined in customer-data.js with Weltpixel pearl theme 1.5.5

Getting TypeError: options is undefined in customer-data.js with firefox, With chrome it's working good no issue. Using Magento 2.2.0 & Wetpixel pearl theme1.5.5 This issue is not coming for all ...
0
votes
0answers
21 views

Magento 2.2.9: wrong data when creating Customer Session from Session Factory

I´m trying to get Customer data and insert it into some hidden inputs on a form. It checks if there is a customer logged in, but the data is from another customer, and it doesn't change even if I log ...
3
votes
1answer
79 views

Session lifetime in magento2 frontend?

What is the maximum session life time for the frontend customers in magento2? Also, Is the session lifetime depends on session.gc_maxlifetime php variable? Any help please?
1
vote
1answer
42 views

Magento 2 : How to end all active sessions for a customer?

I was looking for possibility where i can give option to customer after password update to end all active sessions related to his account . It would be helpful if can point in direction (even with a ...
1
vote
0answers
94 views

Magento 2 TypeError: options is undefined in firefox

After working for few day I noticed that I am getting this issue in my Firefox and not in Chrome. TypeError: options is undefined If I do cache clean and check in Firefox it works for the first ...
0
votes
3answers
111 views

getting null in customer email Magento 2 Custmer session

Edit.php (block) class Edit extends \Magento\Framework\View\Element\Template { protected $request; protected $customerSession; public function __construct( \Magento\...
1
vote
2answers
43 views

M2 | How to Get Logged in customer ID in Model class?

I need customer ID in Model class as I am creating custom API. I can get customer ID in Controller as well as in Block class by all below ways: Injecting in constructor \Magento\Customer\Model\...
0
votes
0answers
33 views

Magento 1.9 Frontend-Sessions

We have a Magento 1.9 installation, which we've moved from one to another server. We did an update from 1.7.2 to 1.9. Since we did that, the frontend sessions seem to get cleared within a time span of ...
1
vote
0answers
94 views

Magento 2.2.8 session_start slow in profiler

We have multiple Magento 2.2.8 websites on one domain (domain.com = Website A, domain.com/store = Website B - separate customer accounts, but often people are registered on both). We're having ...
0
votes
1answer
63 views

Magento 2 : Separate home page for logged in and guest user [closed]

I want to show different home page for logged in user, Which event/plugin I can use for this ? Whenever logged in customer clicks on homepage he should be redirected to different url Logged-in ...
1
vote
2answers
105 views

How to get customer ID Magento 2.3.2

After logged in Magento frontend. I need to get ID of user on which account I am currently logged in. Please help.
1
vote
0answers
29 views

VAT Customer shipping goods to different country with billing address VAT magneto 2.2.3

Not sure how to get this working, if anyone has any idea will be appreciated for the time. My aim is to create a module to check if the customer passing two different countries in billing and ...
1
vote
0answers
32 views

Magento2 - Customer Session set one store to another store

Magento2 - I have setup 2 store like 1: default store view (home page) 2: English ( sub pages ) When I'm going to English store than login its working and get customer session but ...
2
votes
0answers
26 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
3answers
73 views

Magento 2 How to get customer info on resetpasswordpost controller?

Magento 2 How to get customer info on customer/account/resetpasswordpost controller? I am trying this code - echo "<pre>"; print_r($this->session->getData()); and getting this response ...
0
votes
0answers
18 views

Magento 2.3 Cache / Clear Fields

In my checkout steps I have created a few custom fields, and after I fill them out complete the checkout process and am back in store and put a new item in cart and proceed to check out, the same ...
0
votes
2answers
36 views

M2 | Customer is not detecting by $customerSession->isLoggedIn()

I am trying to get loggedIn customer ID, I logged in and it is also showing in Online customer grid in the backend also can see on frontend. But if I check by $objectManager = \Magento\Framework\App\...
0
votes
0answers
19 views

Customer logged in report on magento2.3

Want to have a report to know each customer how many times logged in my Magento 2.3 site. If customer A comes 3 times in a day it should count just once not 3. I want to sort them by day, a weak, ...
0
votes
0answers
40 views

Magento 2 Customer and admin users are getting logged out frequently

My admin panel and frontend users are getting logged out frequently. I though have changed the store > configuration > Advanced > Admin > Security > Admin Session Lifetime (seconds) to 31536000 which ...
4
votes
0answers
249 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
0answers
39 views

Magento 2 - current user session for adminhtml and frontend

I have an observer that applies to both frontend and adminhtml. I need to access the session of the authenticated user. The session for the frontend user is held in \Magento\Customer\Model\Session ...
1
vote
1answer
109 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
1answer
21 views

how to find out where customer subscribed to newsletter from?

Is there anyway to find out where the customer sign up to newsletter from. i know the default way of subscribing is footer, but i am using the exact same way in different page also at checkout. Is ...
0
votes
0answers
83 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 : ...
0
votes
0answers
28 views

Magento 2 Assign customer group name to externally calling JavaScript file variable

PreRequisites: MageVersion - Magento 2.3.x External JavaScript - http://domain.com/external-js.js var mage_customer_group = ''; //other code related to the customer group Pages - Category page and ...
0
votes
1answer
45 views

Tax/VAT field configuration is not working on multistore Magento2 Core

I have a multistory website as Retail-Website and Wholesale-Website Configuration with fresh Magneto2.2 at Store >> Configuration >> Customer Configuration >> Show Tax/VAT Number Retail-Website ...
1
vote
0answers
201 views

Magento2 Tax/VAT field not showing properly in customer registration based on admin configuration

I have Two Website in my magento2.2 webA & webB I want "Tax/VAT number" field in different scenarios on my website webA enabled and required webB enabled and optional I did the ...
3
votes
0answers
60 views

Using Customer Session Factory to avoid depersonalization

We have a plugin that adjusts the customer price on the frontend based on its customer ID. When you use the the Customer Session class it is depersonzalized for a very good reason. But when you use ...
0
votes
1answer
168 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
0answers
29 views

Magento 2.1.15 - PHPSESSID changes from page to page

I am having an issue with Magento seemingly losing sessions and thereby logging users out. I have also noticed that the PHPSESSID cookie value seems to change within one user session. Is that the ...
0
votes
0answers
24 views

Magento 2 I cant able to get the session in Helper function

<?php namespace Sdi\Orders\Helper; use Sdi\Orders\Model\StubFactory; use \Magento\Framework\Module\Dir\Reader; use Magento\Framework\View\Asset\Repository; use Sdi\Orders\Model\EngravingFactory; ...

1 2 3 4 5