[ic] Saving shopping carts on behalf of a customer.

Brian Kaney brian at vermonster.com
Mon Dec 6 17:54:58 EST 2004


On Mon, 2004-12-06 at 17:11, Brian Kaney wrote:
> On Sat, 2004-11-20 at 15:22, Jon wrote:
> > > Greetings,
> > >
> > > How difficult is it to save a shopping cart on behalf of a different user?
> > >
> > > I'd make it available only to privileged users.  The business goal is to create
> > > custom quotations for individual customers and then allow them to quickly
> > > purchase.  I think the built-in saved shopping cart function seems to be the
> > > best approach.
> > >
> > >
> > 
> > Sorry if this doesn't sounds nice but why not just become that user ?
> > And of course only available to privileged users.
> > This makes me think of   su - OtherUser
> > Followed up with the saved shopping cart for that user.
> > 
> 
> I am trying out the switch user function from the "customers" panel.  
> 
> Is there a way I can tell if a user was *previously* logged in as a
> privileged user (like and admin or superuser)? 
> 
> I think there must be some way to tell.  If I logout, I become the last
> user I was logged in as.
> 

I am trying this method.  Basically, I look in session to see if 'su'
has been set:

[perl]
if($Session->{su})
{
    return "You were an admin before!";
}
else
{
    return "You were never an admin!";
}
[/perl]


Is this a good idea, is it safe to rely on this?


Thanks in advance.

- Brian




More information about the interchange-users mailing list