Questions tagged [session]

Denotes questions about session management in Magento.

Filter by
Sorted by
Tagged with
0
votes
1answer
82 views

Session in api-functional tests isLoggedIn always returns false

I have a function in an API call that checks $this->session->isLoggedIn(). The session-object is injected via the consturtor. Now I have to write an api-functional test. But I just can't login ...
1
vote
1answer
86 views

I want to copy magento session data from database to files

I want transfer magento session storage from database to files. I want to know how to do this. What i did is, download [BLOB - 3.6 KiB] file from database core_session table for session and rename ...
0
votes
1answer
693 views

delete session files older than one day, not working

I would like to clean session files older than one day. I clean with cron with this find /path/to/magento/var/session/ -mtime +1 -exec rm {} \; and my cron setting is to run once a day, so 0 0 * * ...
1
vote
2answers
583 views

Customer can't login after Use SID on Frontend = No

I am using Magento 1.9.3 and server Godaddy VPS. I am trying to disable Use SID on Frontend in admin->configuration->web->Session Validation Settings->Use SID on Frontend No. After this ...
5
votes
6answers
2k views

Maintain cart for a week in Magento 2?

I am building a Magento 2 store. The Cart is saved for one hour only, it get deleted after one hour of inactivity. Is there any setting on Magento that allow a longer (may be a week or so) cart ...
1
vote
4answers
3k views

How can I set a session variable in index.php file

I am trying to create a session variable in my store index.php variable by using the following piece of code. Mage::getSingleton('core/session')->setRefer("access"); $refer = Mage::...
0
votes
0answers
197 views

custom controller session reset

I am facing strange issue. Session is reset on custom module controller. have anyone face the similar issue? My code is simple class Test_Testing_IndexController extends ...
0
votes
0answers
330 views

Secure session cookie frontend

How do I enable the frontend secure session cookie? Is there a setting to enable this?
2
votes
2answers
543 views

Magento 2 - Session based authentication doesn't work

I don't know if this is a bug in Magento 2 API or not, so I didn't post it on Magento 2 Github issues. According to this link: http://devdocs.magento.com/guides/v2.0/get-started/authentication/gs-...
0
votes
1answer
2k views

Magento 2 : set value in session from js file

I want to save string from js file in session because i want to use that value in controller. How to save value in session from js file. I want to save one string which size is 200kb. so i want to ...
0
votes
1answer
42 views

How to extend Configurable Class with session data

I'm trying to extend the class \Magento\Swatches\Block\Product\Renderer\Configurable to access session data. So I did this as proposed on so many stacks and tutorials. class ExtendConfigurable ...
0
votes
1answer
634 views

Magento 2: Mini cart product count not updating for current session

I'm using a live chatbox API which is integrated into Magento 2. The problem is: When I add a product from the live chat box, the product counter is not getting updated in the Magento's mini cart. (...
2
votes
1answer
353 views

Magento2 - where the admin console user preferences stored?

I have logged into the admin panel of Magento 2, gone to products->catalog and have set the 'per page' limit to 900. My Magento instance can't return 900 records in one page so it crashes, and a div ...
4
votes
2answers
2k views

How should i get the count of products in wishlist?

<li class="trigger-item"> <?php $moduleName = 'wishlist'; $cartCount = Mage::helper('checkout/cart')->getCart()->getSummaryQty();?> <?php if ($this->helper('...
0
votes
1answer
450 views

Memcached causing Web Setup Wizard Error

I have a Magento 2 store that I just configured memcached on. Everything seemed to be working well and using the guide on the magento site I was able to verify it was working via telnet. However, ...
2
votes
1answer
822 views

How to programmatically sign in to the administration area from a module?

I'm trying to create a module which logs in a retrieved user to the administration panel. (we're talking admins, not customers :) ) I found the following post on how to do this: How to perform auto-...
0
votes
1answer
54 views

Programatically retrieving administrator

I am trying to create a single sign on module for my company within Magento. I've set up a connection to the OAuth guarded server and managed to log in on the authentication server. What I would like ...
0
votes
2answers
298 views

500 PHP error on Mage:getSingleton('admin/session') after separating admin and frontend servers

Working with Magento CE v1.9.2.3 with Redis Doing development for a website that makes use of a separate frontend and admin server in their production environment. I'm attempting to deploy TaxJar and ...
2
votes
1answer
447 views

Session data not saving through controller

I've got a couple controller that I'm trying to use to save and retrieve a custom piece of session data. It works on my local development environment but doesn't work on my staging environment. Here'...
0
votes
1answer
273 views

How to pass very big variable with a redirect in the backend?

I will create a redirect with a very big custom variable in the Magento 2 backend. Now I use this method: $resultRedirect->setPath('custom/url/index',array('_query'=>array('very_big_array'=>...
1
vote
1answer
1k views

Magento 2 - Cookies are not secure

I was wondering if there is a setting for creating secure cookies on M2. I have a vulnerability check and it shown that cookies don't have "secure" tags. Or do I need to override a core function?
0
votes
2answers
930 views

How to get SID programmatically : Magento 2

I am working on multi store Store > Configuration > General > Web > Session Validation Settings > Use SID on Storefront is set to "Yes" allow customer to stay logged in when switching between ...
1
vote
0answers
541 views

Why SID is not coming in URL?

I am working on a multi-store configuration. Store > Configuration > General > Web > Session Validation Settings > Use SID on Storefront is set to "Yes" Store > Configuration > General > Web > Url ...
1
vote
1answer
258 views

How to redirect user after an amount of time?

We need to show a page in case users come from a specific URL therefore we can achieve it with the following: $refererSite = Mage::helper('core/http')->getHttpReferer(); however if user is not ...
-1
votes
1answer
663 views

Magento 2: Check Customer Logged In or Not on Basis of Customer Id

We have below code to check user logged in or not. $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $customerSession = $objectManager->get('Magento\Customer\Model\Session'); ...
1
vote
0answers
101 views

Magento 2 : How to Debug Which Extension is Causing Early Session Timeout or Logout of Admin

I have a problem in admin section where I frequently get logged out at random intervals of time. One thing that I am assured is that one of my extension is causing trouble but I could not find way to ...
1
vote
2answers
451 views

update Programtically created Product

We have 2 buttons in Product view page, after we click on 1st button, we creating Product Programtaically. once click on 2nd button [ after entering email, password] we are assigning that product to ...
0
votes
1answer
176 views

save created product in session and assign to customer after guest logged in

once guest user click on button "create", 1) we are creating product programatically and 2) displaying pop up form to enter email id , password and login button. once click on login button, we ...
8
votes
1answer
10k views

Get current order ID magento 2

I know how to retrieve last order id by this code, $this->_checkoutSession->getQuote()->getReservedOrderId(); Where _checkoutSession is obtained with the injection, \Magento\Checkout\...
18
votes
4answers
8k views

Session validation failure in Magento 1 EE v 1.14.3.x (and CE 1.9.3.x)

I'm looking after a Magento shop with 400-500 visitors and 40-50 orders per day. Recently system was upgraded from Magento EE 1.14.2.4 to Magento EE 1.14.3.2 and I noticed some strange exceptions in ...
0
votes
1answer
991 views

exception during cache and session cleaning magento 1.9.3

I'm trying to install Magento 1.9 and I got this error , how can I solved it,
6
votes
3answers
764 views

Guest can't create product programtaically [ similar to wishlist ]

If the Registered user click on "save design" button we are creating new product. Issue : But if guest user click on "save design" button, we are displaying pop up box to register or login. once ...
2
votes
1answer
744 views

Can't clear home page cache

I've recently switched from memcache to redis to handle the cache and session storage. All has gone well except I can't flush the cache for the home page. Template updates won't show and sessions ...
10
votes
3answers
2k views

Login and redirect customer to his website

In a mutistore-multiwebsite Magento, I'd like to force users to login to the same website they have registered. They might use any login form, in any website, but the form should check their ...
1
vote
1answer
2k views

Session messages not showing

I've created a custom module (in Magento CE 1.9.3.1) where users can participate in a competition to win something. Everything so far works flawlessly and the module is nearly done. However now I want ...
0
votes
1answer
759 views

Magento admin : Fatal error: Call to a member function getUsername() on null

I made an upgrade from Magento 1.4.2 to 1.9.3.2 and everything worked fine. My frontend and backend worked properly. I can log in into the admin panel without issues until a few hours later when I ...
-1
votes
1answer
438 views

Products Export Not working | Both Default export and Custom Script export

I can't able to export my products both using default export and custom script export of product, Actually my site consists 1 lakh products, how can i export my products. error : Fatal error: ...
0
votes
1answer
33 views

How to instantiate a custom session

I'm working on a module with a custom namespace session. I extended the Session class and created a new object, but every time I use the new object it overwrites the parent one while I need 2 ...
2
votes
0answers
188 views

Cross-Domain Session sharing is not working Magento 1.9.2

I have 2 stores set up in two different domain names in one Magento Installation. I have enabled the SID on Frontend to share the session between the two stores using SID as an Url parameter. But it ...
1
vote
1answer
1k views

Magento 2- Redirect customer to home page after customer session expires instead login page?

i want to redirect the customer to the home page after session get expired. Right now it get redirected to the login page. How can i achieve it. Any help welcome.
1
vote
2answers
379 views

Access Magento 2 session data outside of Magento

I have Magento 2 installed in a directory at mydomain.com/shop and I want to access the user's session data outside of that folder (specifically user id and isLoggedIn) so I can use it to log them ...
1
vote
1answer
837 views

Getting current step in checkout in PHP in Magento 1

I got all of the steps using this: Mage::getSingleton('checkout/session')->getData('steps') But how do I get the current step? Not in prototype or js. I want it from PHP. I am using onestep ...
0
votes
1answer
2k views

Magento 2 How to check on front-end side if admin is logged-in or not [duplicate]

The below code works in Magento 1. Mage::getSingleton('core/session', array('name' => 'adminhtml')); $adminSession = Mage::getSingleton('admin/session'); if ($adminSession->isLoggedIn()) { $...
0
votes
0answers
2k views

Magento 2 session id cookie - where to find it?

I have custom php script located inside pub/. It doesn't use Magento objects to limit spent resources because it is called at each page load with ajax call. Inside that script I need to check if data ...
16
votes
4answers
23k views

SOLVED - Magento 2 - Unable to login to admin (no error message) stuck at login screen

This is not a question but rather an answer to a problem that is pretty old but recurring. I remember struggling on this back in the days when I was setting up Magento 1.9 and it occurred again this ...
3
votes
1answer
1k views

How to set Success message with specific location

I have a custom module, with a controller that apply discounts codes in payment page. After the discount it's applied, I set a success message. Now this message it's showing on homepage, even I ...
0
votes
1answer
215 views

Get LoggedIn Customer Details in a custom module block

I am trying to get the customer details from customer session. But I am not able to get it. Below is my code: class Review extends \Magento\Framework\View\Element\Template { protected $...
2
votes
3answers
1k views

Magento 2 Checkout session lost custom data

I have created Custom checkout session in controller : public function execute() { $productData = $this->getRequest()->getPostValue(); $this->_checkoutSession->setData("product"...
0
votes
1answer
321 views

Customers cannot login issue magento 1

This issue is only on Chrome. I got redirected to the login page after login. I tried the following: 1. I put this <?php echo $this->getBlockHtml('formkey'); ?> after the <form> 2. ...
2
votes
1answer
831 views

Magento - how to extend login session time on php.ini or htacess

I'm user of Magento and out website is supported by web hosting company, simplehelix. I want to extend our website session time because the remaining time of login is too short. I already set the ...

1
3 4
5
6 7
12