AbanteCart Community

Shopping Cart Operations => Support => General Support => Topic started by: buddahboy on January 31, 2014, 04:09:40 PM

Title: Act on behalf of customer not working
Post by: buddahboy on January 31, 2014, 04:09:40 PM
Greetings,

When I go to Admin > Customers > and choose a customer then click the "act on behalf of" I get to the customer account interface but when clicking on any of the options I get automatically logged out and returned to a login page.  This is new, was working properly previously.  This particular site is using 1.1.7 as I'm waiting a bit before updating.  This should not have anything to do with the update as it was working before. 

Thank you very much
Ron
Title: Re: Act on behalf of customer not working
Post by: abantecart on January 31, 2014, 04:29:21 PM
I can not replicate the problem you are having. Check the Session Expiration  that you have set in the settings -> system 
Also, check your browser if does accept cookies
Title: Re: Act on behalf of customer not working
Post by: buddahboy on January 31, 2014, 04:52:32 PM
Thanks abantecart - well, session is set to 120 and browser does accept cookies - tried in both Chrome and Firefox with same results.  This is puzzling as it was working before just fine and I have not  made any changes or installed any other extensions.  Will try a couple of other things and report back if there are any positive findings. 

Appreciate the assistance
Ron
Title: Re: Act on behalf of customer not working
Post by: llegrand on January 31, 2014, 06:38:09 PM
So I was testing in 1.1.8 to see if there was an issue that, too. 
Here's what I found:
1. First attempt using a customer that had no transactions - I too could only get it to go to an account logon page.
2. Next - I made a transaction - status pending.  Now I could get it to act on behalf of customer correctly.
3. Next I tried going into the same customer using the edit,  then clicking on the act on behalf - this opens a tab with a screen that looks odd, and any of the links clicked go to the account login page.  - Therefore that link fails.

This leads me to questions:
1.  Ron - does the customer you're trying to access have any transactions?

2. Abantecart - this is of more interest:  We need to already have a customer set up on an account AND they need to have a transaction process before we can use this feature?  Please confirm if that is the expected result of the feature - act on behalf of customer. 

3. The edit/actonbehalf tab is just an issue that needs resolve.

Lee
Title: Re: Act on behalf of customer not working
Post by: buddahboy on January 31, 2014, 07:17:41 PM
I tried this on my dev site as well, which has been updated to 1.1.8 with the same results. 

used my own test account from when testing site which made purchases and has 2 downloads pending
customer status "on"
customer has purchases - status pending - - get to customer account page, when click on any option go to logged out sign in page
Title: Re: Act on behalf of customer not working
Post by: gordontaylor on January 31, 2014, 07:41:03 PM
I was able to replicate this as well, but then I did a transaction and all was fine.

If you just create an account with zero transaction, it will not let you act on behalf of, just takes you to the log in screen.
Title: Re: Act on behalf of customer not working
Post by: llegrand on January 31, 2014, 08:45:32 PM
Gordon,  try taking it one step further please.

one the customer that you know has a transaction - on the Sales > Customers page , click on the EDIT on the right side.
From that page,  click on the button Act on Behalf of - then report what happens.   That's where I get taken back to the Account Login Page.

Title: Re: Act on behalf of customer not working
Post by: gordontaylor on January 31, 2014, 10:10:24 PM
Gordon,  try taking it one step further please.

one the customer that you know has a transaction - on the Sales > Customers page , click on the EDIT on the right side.
From that page,  click on the button Act on Behalf of - then report what happens.   That's where I get taken back to the Account Login Page.

Exactly right Lee, same here....Bug Report!!
Title: Re: Act on behalf of customer not working
Post by: abantecart on January 31, 2014, 11:33:31 PM
Thank you for steps, but I still do not understand the problem. I will try tomorrow again.
Title: Re: Act on behalf of customer not working
Post by: gordontaylor on February 01, 2014, 04:53:11 AM
There are two issues here that Lee and I are addressing...oh and BuddaBoy also.

First issue is when someone creates an account...but DOES NOT buy immediately, you can not act on their behalf in the Admin Panel.
   Path is - Sales>Customer>ActOnBehalfof when clicked takes you to the log in page, instead of into their account.

Also following that path, if you click on the Edit icon the Act on behalf of Orange Button it also takes you to the log in page, instead of their account.

Once that customer has made a purchase, all works well. So in summary, no transaction - no access to their account in admin panel.
    It would be helpful if we could access their info, helpful from a customer service aspect, if they call and want to change info or have input a bad email address, for instance.


Screen shots attached...
Title: Re: Act on behalf of customer not working
Post by: buddahboy on February 01, 2014, 09:43:43 AM
Seems we got us a hornet's nest goin' here!  I did finally manage to get this sorted out by making sure there was at least 1 transaction - I was basing my initial problem report on those that had sales but no transactions (test users that did not have their status changed from pending to complete) - but once I had a transaction associated it would take me to the customer account and allow for "act as customer" 

Same thing in both 1.1.7 and 1.1.8 - Lee got it right, it's a transaction contingent action.  Works fine for me in both places that "act as customer" shows.  Thanks for the help in understanding. 

Ron
Title: Re: Act on behalf of customer not working
Post by: gordontaylor on February 01, 2014, 10:20:28 AM
@buddaboy....I'd like to see it work without a transaction also, for customer service purposes. Some folks are not computer savvy, and if they made a mistake before they placed an order, it's likely you'd get a request to help them fix their issue.

As it stands, editing the CX only gets you their log in info and nothing else. i.e. Address etc.
Title: Re: Act on behalf of customer not working
Post by: buddahboy on February 01, 2014, 10:50:27 AM
Agreed, would be much more dynamic if usable without transaction. 

Thanks
Ron
Title: Re: Act on behalf of customer not working
Post by: abantecart on February 02, 2014, 05:49:04 PM
Are you guys sure that customer's account you have problem with is with status ON (enabled)?
I can get what you explain ONLY if account is disabled (OFF). This would be expected behavior.

Unfortunately, I can not replicate the problem you explain. I want to see what you guys see.
Title: Re: Act on behalf of customer not working
Post by: gordontaylor on February 02, 2014, 07:04:18 PM
@AbnateCart

Yes, the customer is approved and turned on. You can only edit the customer, which only gives you access to their username, email and password.

However, once you do a transaction you can then access the rest of their data.
Title: Re: Act on behalf of customer not working
Post by: llegrand on February 02, 2014, 07:14:01 PM
yes,  in my case customer is ON  and approved -
I will run some more test scenarios later today or tomorrow and maybe make a video so you can see what we're seeing.
Lee

Update- after testing:
I made a new customer with no completed order - and it works as it should.   The other customer was made on v 1.1.7,  and it still has issues.  So my "theory" now says maybe it has something to do with customers created previous to 1.1.8.

Ron - can you test that on your dev system - make a new test customer on 1.1.8 and see if it behaves correctly?
Gordon - I am not sure if your customer was created prior to 1.1.8 update, if so try it with a 1.1.8 test customers.

Thanks guys.  Lee

An update to the above -  sad to say that it worked correctly on the first visit.  BUT if I go back a second time after closing
the results are the same it takes me to the account login page.  ???

Abantecart - this is all on my dev site - if you would like to see for yourself I'll be happy to give you access for a firsthand peek - just let me know.
Lee
Title: Re: Act on behalf of customer not working
Post by: Basara on February 03, 2014, 04:21:36 AM
Are you guys sure that customer's account you have problem with is with status ON (enabled)?
I can get what you explain ONLY if account is disabled (OFF). This would be expected behavior.

Unfortunately, I can not replicate the problem you explain. I want to see what you guys see.

Same on my side. If NO transaction I`m still able to 'Act on behalf' without any issues. Checked in latest FireFox & Chrome browsers
Maybe this is related to servers on only for 'upgraded cart from 1.1.7 to 1.1.8'?
Title: Re: Act on behalf of customer not working
Post by: gordontaylor on February 03, 2014, 08:55:02 AM
It must be do to the upgrade, it worked in 1.1.7
Title: Re: Act on behalf of customer not working
Post by: llegrand on February 03, 2014, 12:06:04 PM
Abantecart Admins -  what file handles the act on behalf transactions?   I would like to upload that file to the problem site and see if that solves the issue.

Thanks - Lee
Title: Re: Act on behalf of customer not working
Post by: gordontaylor on February 03, 2014, 03:10:44 PM
Abantecart Admins -  what file handles the act on behalf transactions?   I would like to upload that file to the problem site and see if that solves the issue.

Thanks - Lee

Lee reports to me privately, that with 1.1.8 installed on a different server she has works as the admins are seeing the issue....which is NO issue. Therefore one must conclude that it's a server issue with the php configuration perhaps.

At any rate, it's NOT a big deal, just a quirk we were trying to get sorted out. If it won't work on my hosting company, that is on me....not AbanteCart.
Title: Re: Act on behalf of customer not working
Post by: llegrand on February 03, 2014, 06:39:36 PM
Gordon,  I didn't reach that conclusion.  To prove my point to myself I just completed uploading a fresh install to the same "problem" server with a new installation on a sub-domain.

It does not have the issue -  act on behalf works as it is suppose to.  Since the upgrade on another server also didn't have the issue my conclusion is that my issue is there is a corruption in the file that handles.

So I am back to asking the Admins - what file(s) effect 'act on the behalf'   or what the other suggestion to replace files.

Thanks
Lee
Title: Re: Act on behalf of customer not working
Post by: gordontaylor on February 03, 2014, 07:36:31 PM
Ah, gotcha, I had it wrong. I leave it in the capable hands of the core guys!
Title: Re: Act on behalf of customer not working (after much testing!)
Post by: llegrand on February 04, 2014, 03:45:26 PM
Ok,  I do believe it is a matter of a corruption during the update.   After extensive testing for 2 days and many installations of 1.1.8 and 1.1.7  all on the same server and using subdomains for fresh installs so we could eliminate the server issue as the problem. 
No chagnes have been made to the server setup during any of this testing.

Here's my results:
1,  the original site with 1.1.8 update applied to 1.1.7 will not function on the act on behalf
2.  a fresh install of 1.1.8 on new subdomain - did not fail on first try,  but after using act on behalf once it locks up and will not function again.
3.  a fresh install of 1.1.7 on another new subdomain -  worked flawlessly time after time.
4.  an update of site #3 from 1.1.7 to 1.1.8  works as expected.


So if you will provide me with the files that effect act on behalf - I will reload them to the original site and verify this is the fix so perhaps the others with this issue can get a resolve also.

thanks
Lee
Title: Re: Act on behalf of customer not working
Post by: gordontaylor on February 04, 2014, 04:09:06 PM
Good job Lee, persistence pays off!
Title: Re: Act on behalf of customer not working
Post by: DavidLIR on February 04, 2014, 08:06:52 PM
Thanks for the discussion, Lee, Buddhaboy, Gordon,

I am also getting the same response the 3 of you are getting. And to add my 2 cents to the pot...I agree that this is very necessary for helping a customer who is needing help in perhaps getting their first order done correctly!

Title: Re: Act on behalf of customer not working
Post by: junkyard on February 05, 2014, 12:41:07 PM
   Public function actonbehalf() is called from:
~/public_html/admin/controller/pages/sale/customer_transaction.php
~/public_html/admin/controller/pages/sale/customer.php
Title: Re: Act on behalf of customer not working
Post by: llegrand on February 05, 2014, 04:52:32 PM
thanks for the files Junkyard -  just finished changing out those two files from the one working test site to a not-working test site -  didn't seem to change anything - I did remember to clear caches, etc.

So either my thoughts on a file corruptions are wrong - or ?  So I think I will just start working thru the files one at a time from the one test site that does work correctly and see if I can hit the offender.  I'll report back when I've finished. 

Lee
Title: Re: Act on behalf of customer not working
Post by: gordontaylor on February 05, 2014, 05:10:22 PM
I've had a few things acting a little weird with regard to customer stuff.

i.e. A dummy account that worked just fine on 1.1.7 gave some weird errors when trying to log into it as a CX.

1st time trying to log in I got a 500 internal server error. Hit the back button then hit submit again and it logged in just fine, and every time after that.

Tired a second account and same thing happened.
Title: Re: Act on behalf of customer not working
Post by: helperbee on February 02, 2016, 01:50:30 AM
Was this ever resolved? I'm having the same issue. I can't use "Act on Behalf" to help a new customer.
Title: Re: Act on behalf of customer not working
Post by: Basara on February 02, 2016, 03:23:13 AM
Was this ever resolved? I'm having the same issue. I can't use "Act on Behalf" to help a new customer.

Hello. This is old topic. Current AbanteCart version is 1.2.5
What AbanteCart version you have?
Title: Re: Act on behalf of customer not working
Post by: helperbee on February 02, 2016, 01:29:00 PM
Version is 1.2.2.  "Act on Behalf" worked in 1.2.1 and may have worked initially in version 1.2.2 but I can't verify that the shop owner used it right after upgrade. Is it advisable to upgrade while this problem exists?

We're also having a critical app error message stating "aMySQLi  class error: Try to escape non-string value:array(0=>'748',) in /home/xxx/public_html/shop/core/database/amysqli.php in line 118"

Could it be related and should we resolve this mySQL error prior to upgrade?