cancel
Showing results for 
Search instead for 
Did you mean: 

After logout, customer name still shows in header

After logout, customer name still shows in header

Hi,

 

So I'm not sure if it's a default thing with Magento, but after a customer logs out, at the top it still says "WELCOME, CUSTOMER NAME! (NOT CUSTOMER NAME?)"

 

Right now, I have my session cookie set to 1 day, however the text in the header is causing issues for me because a customer will come back the following day, see their name at the top, assume they're still logged in, then proceed to checkout. This is fine for normal customers, but my wholesale customers, it still lets them see their pricing but when the get to checkout, it tries checking them out as a normal customer and not a wholesale customer. I have different payment and shipping methods setup for my wholesale customer group. 

 

So in short, is there a way to make it to where the ""WELCOME, CUSTOMER NAME! (NOT CUSTOMER NAME?)" goes away completely when someone logs out?

 

5 REPLIES 5

Re: After logout, customer name still shows in header

Hi @ericfox83

 

It sould like you are having an issue with either a block being cached, and or some full page caching module.

 

If its a block cache issue, You need to locate that is responsible for rendering the text. It will have a method called, getCacheKeyInfo.

 

This method should return an array, these dertermins if the object can be fetched from cache, or it needs to be rerendered. Simple adding: Mage::getSingleton('customer/session')->isLoggedIn() to this array might solve your issues.

 

 

Re: After logout, customer name still shows in header

It appears to be block mage_persistent_block_header_additional, it's located in frontend/base/default/template/core/link.phtml.

 

I'm hesitant to edit that file since it's a core file, any suggestion what to do? 

Re: After logout, customer name still shows in header

We, too, are running into this issue.  Can you explain how you ended up resolving it?  Tx.

Re: After logout, customer name still shows in header

I have recently developed this issue with my site, did you ever manage to sort this out?

 

Thanks,

 

Mathew

Re: After logout, customer name still shows in header

You may need to reproduce the below steps:

 

1. Set the "Clear Persistence on Sign Out" setting in the "Persistent Shopping Cart" section to "No"

2. Clear sessions (delete var/sessions)

3. Clear cache (delete var/cache)

 

I hope after the above changes, only authorized menus should be displayed to logged out customer instead the ""WELCOME, CUSTOMER NAME" links anymore shown in the header.

-- Ravindra