Questions tagged [session]

Denotes questions about session management in Magento.

Filter by
Sorted by
Tagged with
2
votes
3answers
603 views

Add event to customer registration success

I have a custom field in customer registration form which I want to add the value of it into a session variable called passcode. So far I have no success, what am I doing wrong? <input type="text" ...
0
votes
1answer
150 views

Magento one-install multisite setup, how to keep multisite url for backend?

I have setup Magento multisite. I tried both these options: Subdomain install, in htaccess with SetEnvIf I checked the domain and If domainx then runcode = site2 Subfolder install, created a ...
3
votes
0answers
421 views

Can't getCustomer isLoggedIn magento2?

I try get custommer is login. it not success. this is my code protected $_customerSession; public function __construct( ... \Magento\Customer\Model\Session $customerSession, .... ){ ... $this->...
2
votes
1answer
776 views

What is the 'true' argument in session->getBeforeAuthUrl(true)?

What is the 'true' argument in session->getBeforeAuthUrl(true)? I see some cases where it is $session->getBeforeAuthUrl(true) and some $session->getBeforeAuthUrl() What's the difference? ...
4
votes
1answer
595 views

Disable cart sharing for different Stores

I'm running a Magento 1.9 CE shop with two different stores (each store has two StoreViews) and I'd like to disable the cart sharing feature. So when I switch from one store to the other store, the ...
1
vote
1answer
188 views

My shopping cart works randomly when moving to different pages

I've spent hours and days trying to fix it but I can't figure out why when I move from one page to another my cart changes. First of all I add a product to the cart. The cart updates itself and I can ...
1
vote
1answer
1k views

How to reinitialize cart/quote after a checkout?

When a user checks out, the quote is becoming null, and the ID becomes 0. This is causing a problem because the next time I'm calling cart = Mage::getSingleton('checkout/cart'); and using the cart ...
1
vote
1answer
372 views

Magento call session object directly to get last added session messages

I am working on Magento 1.9.1.0 site which has been heavily customized for client's needs. By "heavily customized" I mean not just templates override but also many modules added for "Model" and "...
1
vote
0answers
205 views

Session Message Redirect in seperate function

before redirecting I set an errormessage on the session like this Mage::getSingleton('core/session')->setError('ERROR::Please enter all fields'); session_write_close(); $this->...
0
votes
2answers
1k views

Session is changed after redirect

I am basically trying to implement following thing. I have 2 parts in my app - one is magento for billing and another one is CMS which uses magento as biling gateway CMS renders a page with hidden ...
1
vote
2answers
1k views

can't get session variable set before _redirectSuccess in controller

in rewrite customer controller, in session, custom var 'email' is set: if(!empty($customer_data)){ $session = Mage::getSingleton('core/session', array('name' => 'frontend')); // or $...
0
votes
1answer
1k views

Clearing Magento sessions folder via SSH because of Inode space - Linux. & Cron Job

Just wanted some clarification on a question I previously asked. I'm going to clear my Magento's session folder (.../var/session/). How many days should I clear it prior to? If I cleared the ...
1
vote
1answer
3k views

Destroy customer sessions programatically

Even if I'm logged out of the site, I see my information in Online customers section in Magento admin if I'm not closing the window which seems to be normal Magento flow. How can I destroy my session ...
3
votes
1answer
730 views

Maximum execution time exceeded. Clearing cookies only solution

I am running in into this weird error on our site http://amanvida.eu. The problem is hard to recreate, and I haven't been able to pin point a cause. It does happen more often when you are logged in ...
2
votes
4answers
4k views

Magento completely broken: Call to a member function getCode() on boolean & There was no 404 CMS page configured or found

Suddenly (without any changes or updates) our magento installation seems to be completely broken. Every day we're now getting some of this errors: There was no 404 CMS page configured or found when ...
0
votes
1answer
289 views

Magento Admin Session Issue

I am working on simple php script with email functionality which is depends on admin login in magento admin panel. I use this code for check session of admin in my php file. if (Mage::getSingleton('...
0
votes
1answer
988 views

Magento admin user logging-out after some time [duplicate]

I am facing an issue in Magento 1.9.2.1 that is my admin user is getting logged-out automatically after few minutes. I have checked in back-end for the settings and all seems correct. This majorly ...
0
votes
1answer
160 views

Magento re-writing wishlist controller

I've re-written wishlist controller Mage_Wishlist_IndexController's function _addItemToWishList() and on product page added a button and called this function making an ajax call. <input type="...
2
votes
1answer
779 views

When does Magento decide to give a guest a new visitor_id? Cart gets empty sometimes

When does Magento decide to give a guest a new visitor_id? I noticed many entries in log_visitor table, and session_id often is replicated many times, and that makes cart get empty sometimes for some ...
4
votes
2answers
666 views

Sessions adding up to ~256MB+ per day, is this too much and if so can it be prevented?

On of Magento sites is currently building up sessions files fairly fast and I'm having to clear it once or twice a day just to be safe. The reason for this is because I put sessions in RAM which means ...
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
103 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
72 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
854 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
52 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
253 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
111 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
152 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
708 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
244 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
728 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
550 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
282 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
505 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
4k 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
355 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
336 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
511 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
2k 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 ...

1
7 8
9
10 11
13