Try the Demo

Magento Forum

   
Page 1 of 3
Check if user is logged in
 
iDave
Member
 
Total Posts:  33
Joined:  2008-03-10
 

Can someone pin-point a starting point to check if an user is logged or not?
I wan’t to be able to hide certain parts of the site to visitors.

 
Magento Community Magento Community
Magento Community
Magento Community
 
mzentrale
Guru
 
Avatar
Total Posts:  731
Joined:  2007-12-06
Stuttgart, Germany
 

Hi,

where do you want to manage this? within phtml? within layout? Or within modules?

cheers

 Signature 

mzentrale | eCommerce - eBusiness
Agentur für eCommerce Beratung, Entwicklung & Marketing.
Magento™ Silver Partner
----

 
Magento Community Magento Community
Magento Community
Magento Community
 
iDave
Member
 
Total Posts:  33
Joined:  2008-03-10
 

I wan’t to hide the prices, for example, if users are not logged in. I think this can be done by design.
Secondly i would like the hide and disable the cart (and mini cart in right column) and the checkout pages before the user is logged in.
This is a modulair modification i guess.
Would be easyer of it could be done centralised.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Mageho
Sr. Member
 
Avatar
Total Posts:  290
Joined:  2008-03-24
France, Paris
 

Use the helper customer :

$this->helper('customer')->isLoggedIn()

 Signature 

Mageho : Agence e-commerce Magento

Atos Pro Extension

 
Magento Community Magento Community
Magento Community
Magento Community
 
Madrilene
Jr. Member
 
Total Posts:  17
Joined:  2008-04-01
 

Hi iDave
i’m not a specialist, but if you hide the price only by design, they stay available with “watch the source” of the page in the code non ?
So if you really want to protect this data, i seems not to be a very secure way to proceed ??

If somebody can confirm or not because i’m a newbie !

 
Magento Community Magento Community
Magento Community
Magento Community
 
iDave
Member
 
Total Posts:  33
Joined:  2008-03-10
 

Good point there.

Check must return true or false and then the page must be generated with or without prices.

 
Magento Community Magento Community
Magento Community
Magento Community
 
iDave
Member
 
Total Posts:  33
Joined:  2008-03-10
 

I think a lot of people would like a module where you can set the access level per user group.
Like view prices, add review, view cart, register, ...

 
Magento Community Magento Community
Magento Community
Magento Community
 
Madrilene
Jr. Member
 
Total Posts:  17
Joined:  2008-04-01
 

I second that !!! grin
numerous situations where it would be necessary, for instance; if you want to have a kind of VIP club with some exclusive to some parts of the site…

 
Magento Community Magento Community
Magento Community
Magento Community
 
manolodf
Member
 
Avatar
Total Posts:  56
Joined:  2008-03-28
Dallas, TX / Hong Kong
 

Yes, This sounds something like the Mebership level in x-cart, Basically you can assing a user a certain membership level, either normal, none, Wholesale, Dealer, VIP etc. THen you can have products be available to only one or not one of the Membership levels, as well as having different pricing for the different membership levels. This is a must-have. Can manage taxes based on membership levels as well.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Madrilene
Jr. Member
 
Total Posts:  17
Joined:  2008-04-01
 

So how to promote this “must have” and push it toward reality ?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Very Clever Stuff
Sr. Member
 
Avatar
Total Posts:  90
Joined:  2008-05-06
Sheffield, UK
 

I’d like to second the option for different user levels. I’m currently looking for a solution whereby I can use my site to sell both retail and wholesale.

At the very least, I need to be able to hide the prices (the wholesale part of the business is primary, and I obviously don’t want to show the end-user the wholesale prices).

I’ve been looking at Magento as it looks like such a far superior product to things like osCommerce.

 Signature 

Dave Speake
Very Clever Stuff

 
Magento Community Magento Community
Magento Community
Magento Community
 
agcilantro
Jr. Member
 
Total Posts:  15
Joined:  2008-02-29
 

I would also be interested in this.
The seo capablilities of Magento out of the box are so good that I am finding it hard to hide wholesale pricing from my retail customers.  Has anyone come up with a solution for this?

I am running 4 different stores, and the multiple pricing works perfectly.  The only thing lacking is the ability to hide pricing from those that have not logged in.

 
Magento Community Magento Community
Magento Community
Magento Community
 
nrhammond
Jr. Member
 
Total Posts:  10
Joined:  2008-08-11
 
ryu007 - 02 April 2008 05:24 AM

Use the helper customer :

$this->helper('customer')->isLoggedIn()

Is there a way to do this with files outside of magento?  I have a videos directory that I would like to see if the user is logged in or not and if not redirect them to the login page.

I also need to find out what the currently logged in user’s id is so that I can pull down their videos. What’s the best method for that?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Templar
Jr. Member
 
Total Posts:  5
Joined:  2008-08-05
 

If i want check on every page (and if not logged in redirect to other page), what should i do?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Richard Feraro
Jr. Member
 
Avatar
Total Posts:  21
Joined:  2009-02-12
Manila
 
ryu007 - 02 April 2008 05:24 AM

Use the helper customer :

$this->helper('customer')->isLoggedIn()

i think this code only checks if the customer ID is present on the current session of Magento but in the Admin Area the user still appears to be offline.

 Signature 

My Silly Point of View

 
Magento Community Magento Community
Magento Community
Magento Community
 
tahiragwan
Jr. Member
 
Avatar
Total Posts:  10
Joined:  2009-06-16
 

Very helpful, thanks

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
Page 1 of 3