Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 9 of 9

Thread: Get Impersonated Customer

  1. #1
    K-BL is offline Member
    Join Date
    Aug 2008
    Location
    USA
    Posts
    43

    Default Get Impersonated Customer

    Ok guys, you've got me racking my brain on this one. How do I get the Impersonated Customer object? Every time I reference ThisCustomer is comes back with the administrator.

  2. #2
    Rob is offline Senior Member
    Join Date
    Aug 2004
    Posts
    3,037

    Default

    LOL where are you trying to get (access) and use it?

    and yes this is not a trival feature of the cart, so a bit hard to explain, but we can give specific advise if you give us more to go on.

    yes. each time I look at this logic, I have to go refigure it out myself
    AspDotNetStorefront
    Shopping Cart

  3. #3
    K-BL is offline Member
    Join Date
    Aug 2008
    Location
    USA
    Posts
    43

    Default

    The mini cart.

  4. #4
    Rob is offline Senior Member
    Join Date
    Aug 2004
    Posts
    3,037

    Default

    have NO clue yet...can you explain more?
    AspDotNetStorefront
    Shopping Cart

  5. #5
    Rob is offline Senior Member
    Join Date
    Aug 2004
    Posts
    3,037

    Default

    what exactly are you trying to do? glad to advise, I just still don't quite get it...so the more you give us, the more we give you back
    AspDotNetStorefront
    Shopping Cart

  6. #6
    K-BL is offline Member
    Join Date
    Aug 2008
    Location
    USA
    Posts
    43

    Default

    I'm trying to access customer information from code behind. Standard customer declarations are resulting in the impersonator, I need the impersonated.

    The reason: I've built an ajax add-to cart, and I'd like the minicart to update accordingly with each subsequent product added.

    Is there an alternative to AspDotNetStorefrontCommon.Customer.Current that will do this?

  7. #7
    K-BL is offline Member
    Join Date
    Aug 2008
    Location
    USA
    Posts
    43

    Default

    Anyone? Impersonated customer.

  8. #8
    K-BL is offline Member
    Join Date
    Aug 2008
    Location
    USA
    Posts
    43

    Default

    How do I get the impersonated customer from code behind? Am I being to general?

  9. #9
    K-BL is offline Member
    Join Date
    Aug 2008
    Location
    USA
    Posts
    43

    Default

    Since I never got a response back from this, I thought I'd post my result. At first glance, this may seem difficult when it in-fact is quite simple.

    Code:
            var thisCustomer = Customer.Current;
            var possibleIGD = thisCustomer.ThisCustomerSession["IGD"];
            if (possibleIGD != "")
            {
                thisCustomer = new Customer(new Guid(possibleIGD));
            }
    If anyone find fault with this code, please let me know, but this method is working great for me.

    Robert
    Robert Plummer
    VisOp-Dev.com
    Visual Interop Development