Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [customer-session]

The tag has no usage guidance.

1
vote
1answer
13 views

Customer Session Delay

I have a .phtml file that loops through dropdowns. There are 6 dropdowns belonging to two different groups (so 3 dropdowns per group). I set a session on button click: if ($this->getRequest()->...
0
votes
0answers
18 views

In Magento 1.9, how to access session id on the client side using javascript?

According to the following 2 answer, PHP session id is stored on the client side and with each request, the session id is sent to the server which is what helps the server in identifying the client. ...
0
votes
0answers
22 views

Magento 2 loginPost error

When I login in Magento 2 I get this following error. Fatal error: Uncaught TypeError: Argument 1 passed to Magento\Customer\Controller\Account\LoginPost::__construct() must be an instance of ...
0
votes
0answers
21 views

Get Voucher when you enter email address on a page

I want to give voucher code if user enters email address soon as they enter the email (Discount should be showed in page) i want to set cart rule for the voucher Is this possible
1
vote
0answers
24 views

How to trigger reload window , after customer cookie lifetime expiration?

I want to achieve functionality, where the screen will automatically reload when customer cookie lifetime is expired. Currently, by default Magento expire cookie and session from the server side, but ...
0
votes
1answer
30 views

Magento 2 validate customer session with extra parameters

I have implemented Two factor authentication for customers. So customer logins from frontend and if they have entered login details correct then they will be redirected to our two factor ...
0
votes
2answers
155 views

Customer Session not working on full page cache in magento2

This is my code below $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $customerSession = $objectManager->create('Magento\Customer\Model\Session'); if ($...
0
votes
0answers
25 views

Does Magento 2 ever clean up it's own old sessions?

We currently have a production site with 4.2 GB of session data, dispersed over 2.8 million records. Some of these sessions are more than 1,5 year old! I was always in the assumption that Magento ...
2
votes
1answer
72 views

why I take session of other customer

I have a problem with a Magento2 installation. If I am logged in as a client on a browser, with another browser (client not logged in). If I do the same actions on both browsers, the second browser (...
0
votes
2answers
61 views

Magento2: Customer name is not showing on product page

When the cache is enabled customer name is not showing on the product page. When the cache is disabled customer name is showing properly on the product page. header.phtml <?php /** * Copyright ©...
4
votes
0answers
63 views

No such entity with cartId = 0 on checkout page

Customer lost session occasionally on checkout page. After login when i go to checkout page it's shows me below error but after refresh 4 5 times customer session restore again but after refresh ...
4
votes
2answers
36 views

Log User in programatically for Magento 2 (via Contoller)

I have a process in Magento 1 to log user in using the below; $session = Mage::getSingleton('customer/session'); $email = $this->getRequest()->getParam('email'); $password = $this->...
0
votes
0answers
18 views

Magento 2.2 Create Order for customer from frontend As Sales Rep

Hi Magento Developers, I am having one scenario here, I have created customer group as Sales Rep. With this group, Sales Rep (as customers from frontend) can create new customers with General group. ...
5
votes
2answers
139 views

Customer logged out after checkout & redirected to empty shopping cart - Magento 1.9

I'm trying to find out why some logged in customers are being logged out of their accounts and redirected to an empty shopping cart after clicking the place order button in Magento. I am using ...
2
votes
2answers
90 views

load customer object update issue in magento 2?

I have used below code in my controller use Magento\Customer\Api\Data\CustomerInterfaceFactory; class editPost extends \Magento\Framework\App\Action\Action { protected $_customer; protected $...
1
vote
1answer
62 views

Fatal error in Constructor controller in Magneto2

I am creating sub user for current logged in customer below is my controller code use Magento\Framework\App\Action; use Magento\Framework\Exception\NotFoundException; use Magento\Framework\...
0
votes
2answers
40 views

Get current customer collection in custom account navigation link

I have created the custom link in customer account left navigation. I am successfully created it. I am trying to get current customer Data in template file. I am getting 500 server error. Below is ...
1
vote
0answers
57 views

Lesti FPC customer login/logout issue

I recently started using Lesti FPC in one of my M1.9 sites and for the most part it works pretty well. But I came across an issue with customer login/logout. To better explain the issue, let's say ...
0
votes
1answer
151 views

Magento2 customer login and registration session not working in frontend in chome? [closed]

I have successfully logged in firebox but customer session not working in chrome browser. Can anyone help me to get the solution? It's not localhost , am checking on linux server.
5
votes
2answers
553 views

How to get CustomerId in API in magento 2? and how magento gets customerId for the same?

Magento didn't load the customer session in API as used in web session based authentications. and i am aware about the API <magento.host>/rest/V1/customers/me My question is, how do I make ...
0
votes
1answer
72 views

Magento 2: How to manage simple user (customer) login session for different device?

Using Magento 2.2, I need to allow customer login only one device at a time. Ex. if the customer is already logged in the computer, but user tries to log in with a smartphone, the Magento will ...
0
votes
1answer
231 views

On customer register got an error message: “Cannot save the customer”

Couple of hours ago the registration worked well. Suddenly it is not working anymore. Reverted back my code changes and the problem still persists. What I've only done is to clear the cache. To get a ...
0
votes
0answers
103 views

Magento2: Display session expired message for frontend customers

I would like to add a message "Session expired. Please login" when customer session gets expired. For that I have configured: store/configuration/general/web/Default Cookie/Cookie Lifetime Is ...
5
votes
2answers
398 views

Difference between Session and SessionFactory in Magento 2

While working i found there are two methods of getting customer data using two session classes 1.) \Magento\Customer\Model\SessionFactory $customerSession 2.) \Magento\Customer\Model\Session $...
0
votes
1answer
213 views

Magento 2 : Get Customer logged in details not Working on list.phtml

The code bellow isn't working on product listing page: $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $customerSession = $objectManager->get('Magento\Customer\Model\...
0
votes
0answers
110 views

Programmatically log user in with dynamic user session cookie life time

How to set a dynamic session cookie lifetime while logging the user programmatically. I know a common session cookie lifetime can be set via core config web/cookie/cookie_lifetime. But I need to ...
0
votes
0answers
129 views

Magento 2 customer session data not giving customer data

I have a magento application build on Magento 2.1.4 . Earlier it was working fine. Now I am getting very weird situation. When I logged in it shows other users details and their last order on home ...
1
vote
0answers
39 views

Magento2 : limit concurrent logins for the same customer account

I want to limit concurrent logins for the same customer account. If customer already logged in one device and also try to login from another device then customer should be logout from previous session....
0
votes
2answers
188 views

Magento 2 + How to share cart for guest users between multi websites

I have a magento 2 website where I want to share cart between websites (for logged in users and guest users). For ex. guest user added product1 to the cart from website1 and now user switches to ...
0
votes
0answers
16 views

Magento 2.1.7 order went to different customer account

I know this was very broad question, but this caters the security of the customer's account on Magento 2.1.7. Though my Session Validation Settings > Use SID on Storefront was set to No for some ...
0
votes
1answer
165 views

How to access custom data from a customer session in JS file?

Is there any way to access custom data stored in a customer session from a JS file ( without Ajax call ). Here is the code for controller: <?php namespace Company\Vendor\Controller\Index; use ...
0
votes
0answers
18 views

A particular customer is not login while others customers are login

When a particular customer let says CustomerA tried to login he's not able to logged in getting blank page after reaching on below URL:- mysite/customer/account/loginPost/ While others user can ...
0
votes
0answers
93 views

After logout, customer name still shows in header

In my project I integrated magento 2 and codeigniter. After Login from Magento I can access codeigniter also. I saved the session into a file. when I logout from codeigniter I will re-write the ...
6
votes
2answers
2k views

Magento 2 + Customer logged out automatically in checkout process

I have a strange issue on one of the site. When I log in or register as a new customer and adding few items in shopping cart. Then go to the checkout page it is automatically logged out the customer ...
0
votes
2answers
305 views

Customers being redirected to login page when logged in and loading the checkout page

I am using Magento 2.2.2 and have an odd problem. Below is an itemised route to the error. Existing customer logs in Customer adds a product to the basket Customer clicks the go to checkout button ...
0
votes
1answer
198 views

Magento 1.9 How to get Guest user id in CMS pages? [closed]

How to get Guest user id in CMS pages header section? Let me know your suggestions. Thanks.
2
votes
0answers
27 views

Magento2 : Best way to handle Multi Device login using REST API Auth

I am creating an auth token for mobile customer using /V1/integration/customer/token When I use the same customer credentials in Second mobile device the first auth token is invalidated as the ...
0
votes
2answers
47 views

Get Email Address for a user from outside of Magento

In Magento 1, we could simply, umask(0); Mage::app('default'); Mage::getSingleton('core/session', array('name' => 'frontend')); if (empty($sessionCustomer)) { $sessionCustomer = Mage::...
0
votes
1answer
47 views

Magento 1.9 - Customers can't login to frontend [Page refreshes]

Customers can't log into the frontend of the site after development. The two test customers we used to test the site before the migration can login to the site perfectly but every other customer can'...
1
vote
1answer
86 views

prevent multiple login : Magento 2

I want to prevent a customer to login multiple times from different machines. When a customer tries to login I want to logout customer logout from all other machines. How can I logout customer from ...
3
votes
4answers
2k views

How to Add custom data to customer session?

In LoginPost controller using this "Magento\Customer\Model\Session" session. After Login I need to add a custom array to the current customer session. how can i add a custom data to magento customer ...
0
votes
0answers
123 views

Magento 1.9.0.1 Homepage session

I am having problem regarding the customer/session on Magento homepage. Currently i can access and get all Customer information using customer/session but not in Homepage. In all other pages i can get ...
2
votes
1answer
192 views

Session is not working in cron file

namespace send\sms\Cron; use Magento\Framework\ObjectManagerInterface; class Run /*extends send\sms\Controller\Customr*/ { public function execute() { $om = \Magento\Framework\App\...
2
votes
0answers
28 views

How to get Customer Id in Cron job function?

namespace Cron\Test\Cron; class Example { protected $customerSession; /** * Construct * * @param \Magento\Framework\View\Element\Template\Context $context ...
3
votes
2answers
987 views

Magento 2.2.2: Customer session not working with cache enable

I tried this code but when cache is disable. it works, but when I enable cache it does not work. $ObjectManager = \Magento\Framework\App\ObjectManager::getInstance(); $session = $ObjectManager->...
0
votes
1answer
22 views

block function to get customer id not works on my accounts custom tab

My block function to get customer id not works i'm printing customer details in my accounts custom tab use Magento\Framework\View\Element\Template; use Magento\Customer\Model\Session; class ...
0
votes
0answers
63 views

how can I get customers last order details in Magento2 after order is placed

I'm trying to create a function that verifies OTP after order is placed, if OTP verified order status will be processing otherwise it's pending. So I have created custom pages to verify OTP after ...
0
votes
1answer
361 views

How to add customer Id in table Magento 2

This is my code but I can't get the customer Id that's currently logged in. public function checkotp(){ //db connection $this->_resources = \Magento\Framework\App\ObjectManager::...
2
votes
0answers
91 views

Can't get customerId when magento tried to retrieve

I found this error in var/log exception main.CRITICAL:Magento\Framework\Exception\NoSuchEntityException: No such entity with customerId = in /var/www/html/test.com/public_html/vendor/magento/...
0
votes
1answer
366 views

Magento get Customer Data from session id

I've create a login function that make the customer login by email and password and return below response { "status": "success", "message": { "id": "1", "name": "username", ...