Questions tagged [session]

Denotes questions about session management in Magento.

Filter by
Sorted by
Tagged with
2
votes
1answer
3k views

PHP - How to get session current shipping method title

This is code i use for getting current session shipping method code: <?PHP echo Mage::getSingleton('checkout/session')->getQuote()->getShippingAddress()->getShippingMethod(); ?> But ...
2
votes
1answer
2k views

Delete cookie values

In my controller function I'm setting cookie like $cookie = Mage::getSingleton('core/cookie'); $cookie->set('frontAttributeLabel',$frontAttributeLabel ,time()+86400,'/'); In observer I'm ...
1
vote
1answer
99 views

dev.example.com Frontend Login Creates Sessions for example.com (Can't login)

I have two Magento 1.9.0.1 sites. One on example.com and one on dev.example.com Production: Cookie Path: (none) Cookie Domain: example.com Development: Cookie Path: / Cookie Domain: dev.example....
2
votes
3answers
4k views

No Inode space!; How to delete Magento sessions folder's contents?

Hopefully, someone can help me, A Magento website I'm managing keeps going down, I've determined it to be the fact that it has used up all of the Inode space on the server. The output to df -i is ...
0
votes
1answer
71 views

Automatically redirect when session times out?

Is there a way to redirect the user to some URL or route automatically once the session has timed out? I tried finding an event for that I can use, but it seems there is no such thing. It would be ok ...
0
votes
1answer
840 views

Cannot get session value in another controller

I am trying to get the session value in another controller but don't get value from the session: class Vaibhav_User_IndexController extends Mage_Core_Controller_Front_Action { public function ...
1
vote
1answer
51 views

Cart clears after changing email

I am customizing Magento's native one page checkout (ee 1.13). We have been modifying it so that customers could order without authentication (but without guests orders). I'm having an issue with ...
1
vote
1answer
3k views

Store session data as guest and get this data as logged in Customer in observer

I want to set data session when customer is not log in and if this customer logged in i want to retrive this data and i NEED to do it in observer. I used already for example this events to get data: ...
0
votes
2answers
205 views

Cart is empty when customer logged-in

I'm using Magento ver.1.6.2.0. I'm adding some items into the cart without logging-in. After that I am logging in. After getting logged in, Cart shows 0 items. When I check in chrome developer tool->...
0
votes
1answer
110 views

Magento registry in widget's template returns null

I'm trying to pass some data from controller thru redirection to widget's .phtml file. In sampleController.php: Mage::register('demo_access', (isset($request['paragraphText']) ? 2 : 1)); Mage::log(...
0
votes
1answer
150 views

core/session value not available on custom module page

I'm using core/session for storing values, I'm use the following code to store the value: Mage::getSingleton('core/session')->setMyWishlist( $newmywishlist ); On category and product pages but ...
1
vote
3answers
640 views

How to check magento users are logged in or not?

I have 3 Magento users with certain roles and access permission in backend end, i want to know that how many users where logged in, depends up on the logged In users user specific pop up will appear, ...
4
votes
1answer
225 views

Slow Magento - Mage_Core_Model_Session

For some reason this past week my magento store has started loading slowly, particularly the time to first byte being the issue. I've disabled an extension that I installed but to no avail. I've ran ...
0
votes
1answer
667 views

How to check if visitor has visited before?

I'm developing a referral module that allows users to join a referral program. Only visitors who come from a referral link AND have not visited the site before will be counted as referred user. Is ...
0
votes
0answers
266 views

Unable to add product to cart through api in customer's cart. How to do that?

$appEmulation = Mage::getSingleton("core/app_emulation"); $initialEnvironmentInfo = $appEmulation->startEnvironmentEmulation($storeId); $customer = Mage::getModel("customer/customer")->load($...
12
votes
6answers
12k views

How to show session messages at front end in magento 2 beta

I want to show an error or success message in my magento 2 module. I have extended my front-end controller with the class name \Magento\Framework\App\Action\Action. Then I redirect client to home page ...
2
votes
1answer
5k views

How to get my table where my session data stored

i have stored my data in my magento database using <session_save><![CDATA[db]]></session_save> my question is that in which table my data store in my database.
0
votes
1answer
542 views

View session expiration time from database in readable format

I want to see the session expires time in a readable format. The time is stored as an int. Is there a way to see it in a readable format? I couldn't find how Magento is deriving the int. I tried the ...
1
vote
1answer
267 views

Integrate with external frontend

I'm trying, for various reasons, to use an "external" (as in non-Magento) frontend. I do want to keep the checkout process (because I want the order/shipping/invoicing functionality) in ...
3
votes
1answer
475 views

EComDev PHPUnit get and set session data

How do you test setting and getting a session variable in PHPUnit/EComDev? This is what I've so far in my test method: $checkoutSession = $this->getModelMock('checkout/session'); $checkoutSession-&...
3
votes
2answers
213 views

Confused by multiple, conflicting 'Last Logged In' Stats

This is an example of a customer page on the backed. It shows two fields, 'Last Logged In:" and "Last Logged In(America/Los_Angeles):", which is the home timezone of the store. I am confused at what ...
2
votes
1answer
3k views

Magento 1.9 How to set session and clear session in login and logout

I would like to set session during login action and clear session during logout action. By googling I understand the following code will help setting the session and clearing the session. Mage::...
5
votes
2answers
11k views

unable to get customer data from session in custom module?

I am developing custom module which needs to use customer data from session. Here I am having some problem with session. I am unable to get any customer data in my custom module from session even if ...
9
votes
2answers
4k views

Varnish and Turpentine

I am finding that whenever I restart Varnish on my server, I am loosing my sessions for my users. This is is turn making my customers loose their shopping carts. Is this normal behaviour for Varnish ...
6
votes
1answer
2k views

Login Does Not Work Because of Subdomain Cookie

We have a multi site/store which is on a subdomain level (Magento v1.14.1.0): main.com store1.main.com store2.main.com Logging in without the main.com frontend cookie enables the login in store1....
1
vote
1answer
353 views

_getsingleton/customer/session registry already exists [closed]

I have used this code in observer function and event i am using is "controller_front_init_before". Problem is due to first line. Please help me to resolve this issue $customer_session = Mage::...
1
vote
1answer
316 views

Read blob field in core/session table

EDIT Sorry, I have formulated my question extremely badly: I need to retrieve this field(no problem) and read the value with php(problem, I haven't ever met this type of input and I don't know howto ...
1
vote
1answer
504 views

Magento CE cache mounted to ram? [closed]

Ive done alot of reading that mounting var/sessions and var/cache to ram will give a performance boost. However would this still be beneficial if I am using SSD?
2
votes
1answer
1k views

How to Delete Customer Session From Admin

I have been working on a site that requires users to be logged in and approved before they can access the website. That element works fine, except if as an administrator I edit the customer's account ...
1
vote
1answer
2k views

customer/session isLoggedIn() returns false

I was testing our site after working on a new feature and found that some pages showed the customer as not logged in even though it was. For example, the welcome message would show "Welcome to the ...
4
votes
3answers
5k views

How can I load a quote by session ID?

If have the frontend session ID, how can I load the quote associated with that?
1
vote
0answers
488 views

front end customer session expire issue [closed]

logged out immediately After login customer in front end . i checked in system->configuration->session Cookie management and cookie life time is 36000000. for only one website->store view only its ...
23
votes
2answers
30k views

What's the correct cookie config for a Magento site split across multiple instances as subdomains?

The problem A large site uses separate instances of Magento for different geographic regions so the businesses are isolated. Example: site.com north.site.com south.site.com east.site.com west.site....
13
votes
1answer
912 views

Magento varien session start very slow on category pages with MEMCACHE session storage

I am using memcache for session storage and on category pages I have noticed in new relic transactions where varien session start can take over 30 seconds. It can possibly be something to do with ...
1
vote
0answers
2k views

Cookie/session problems on login frontend and admin

I have an issue with login in admin and frontend for accounts. This started in Safari only. Not being a developer I'm not sure how to look to see what the cookie is trying to do, as I don't ever use ...
3
votes
1answer
2k views

Magento form key invalid after page becomes inactive for extended period of time

Running a recently upgraded instance of Magento CE 1.9.1.0 (from 1.7.0.2). Form key support was built in to the theme and is functioning a-okay when browsing the website with different browsers and ...
0
votes
1answer
4k views

How to get SID in magento

I'm trying to add online payment in my magento store and the bank that I work with suggest for making tests that I send to them some variables for testing the security (between them the SID). So my ...
1
vote
1answer
809 views

Grabbing storeview from cookie (after using language selector)

I have written a custom function to set our MAGERUNCODE based on the accept language and the uri request (beeing /). THis works fine. Now I have 1 remaining issue. And this is when the customer uses ...
7
votes
2answers
5k views

Is there a way to pass a coupon code as a URL parameter?

I would like to create URLs which activate a specific coupon. It could be as simple as passing the coupon code as a URL parameter. When a coupon is passed, I'd like it to automatically be populated ...
1
vote
1answer
628 views

Show notice in admin order grid based on filter

Background I am migrating a site to the Magento platform. I have a requirement to notify the admin if they're searching for an order that comes from the old platform. I have table of old orders. I'...
0
votes
1answer
1k views

Setting Custom Session in index.php - Problems

Creating a custom session in a store view's index.php in a subdirectory of the main magento installion. The code I added is as follows: require_once $mageFilename; Mage::init(); Mage::getSingleton('...
1
vote
1answer
708 views

Unset session when store is changed

Actually magento share session with differents Store/view. Is there a way to unset session when i switch store (not website, store). I don't want to share cart between two differents stores. Is it ...
1
vote
0answers
53 views

Mage error on saving a customer [duplicate]

This is occurring whenever I press "Save Customer" in the manage customers area in the Admin panel: Error: Fatal error: Class 'Mage' not found in /app/code/core/Mage/Core/Model/Resource/Session.php ...
1
vote
1answer
2k views

Storage Configuration for Media

Recently I changed media storage from db to files via System > Configuration > System and synchronized. It finished successfully but seems to have reverted back to saving product images in the ...
10
votes
3answers
8k views

Magento session storage: Redis vs. Memcached

I'm running a Magento EE 1.12.2 (equally in CE 1.7.2) where we have Redis for caching (Cm_Cache extension, Redis v 2.2.12), but we use Memcache for session storage. Redis is not supported out of the ...
3
votes
1answer
248 views

How to Set Session Cookie Based on Query-String Param in Magento

I'm building a Magento sandbox environment and need to set a session cookie based on a value in the query-string. The value in the query-string will be used to set an account ID for another service ...
2
votes
1answer
967 views

Persistent cart = off, adding 1 product and login results in 12 products in cart

we are having some issues with sessions it seems. Messages from customers like 'my cart is suddenly empty after login (account)', or 'my cart suddenly has many items after login'. When testing I see ...
1
vote
0answers
732 views

Modifying session.gc_maxlifetime results in front & back-end login loop

After reading that you should modify the session.gc_maxlifetime value to match1 the settings in: System → Config → Web → Session Cookie Management → Cookie Lifetime, and System → Config → Persistent ...
1
vote
1answer
997 views

Persistent Shopping Cart & session.gc_maxlifetime

I've received some conflicting information online about this, but when enabling Magento's native Persistent Shopping Cart is it necessary to also modify the php value for session.gc_maxlifetime to ...
1
vote
5answers
4k views

Suddenly Magento sessions stopped working

Suddenly the session on our live site stopped working. Do not know why this is happening. Our site is hosted on AWS EC2 Linux var and var/session folder exists and have permission 777 nothing there ...