News:

AbanteCart v1.4.2 is released.

Main Menu
support

"Act on Behalf" not working

Started by helperbee, February 07, 2016, 03:22:31 PM

Previous topic - Next topic

helperbee

Our current AbanteCart version is 1.2.5. The feature "act on half" doesn't not work when using HTTPS.
We only have one store.

This is the behavior: when Act on Behalf button is clicked, red popup message appears
"To act on behalf of customer in additional store you should to login into another store's admin side. Continue?"
Clicked Yes.
Login page is displayed with this URL
https://xxx.com/shop/?s=admin123&rt=sale/customer/actonbehalf&customer_id=28
I entered correct credentials, but error:
"Invalid token session. Please login again."

This issues was reported as a bug and logged a while back, but even after upgrading, the issue continues for our site.
What should I try?  Thank you for your kind assistance.

abolabo

it's hard to answer. There can be a lot of causes..
we need to look on it.
can you give temporary access to your admin-side?
"No one is useless in this world who lightens the burdens of another."
― Charles Dickens

helperbee

Yes. Thank you for responding! How do you suggest I do that? Do you want me to create you an admin account?

Basara

Quote from: helperbee on February 17, 2016, 03:12:08 PM
Yes. Thank you for responding! How do you suggest I do that? Do you want me to create you an admin account?

Hello. Send private message with admin access to abolabo He will check where is problem

abolabo

i checked your admin and your case looks like:
you created some additional store, some customers registered in it, and then this additional store was deleted, but assignment "customer-to-store" still present.
Can you please check you database table "customers", column "store_id".
value must be the same as in table "stores".
"No one is useless in this world who lightens the burdens of another."
― Charles Dickens

helperbee

Quote from: abolabo on February 18, 2016, 04:39:51 AM
i checked your admin and your case looks like:
you created some additional store, some customers registered in it, and then this additional store was deleted, but assignment "customer-to-store" still present.
Can you please check you database table "customers", column "store_id".
value must be the same as in table "stores".


The "stores" table has no records.
The value for "store_id" within "customers" table is 0 for all records.

If I were to create a record for the "stores" table, the store_id column is "AUTO_INCREMENT" so I don't know if I can enter the value of "0" ...plus what value is needed for the "alias" and "status" columns?

I tested the above, by using "status=1", but it did not fix the "Act on Behalf" issue.

abolabo

Quote from: helperbee on February 18, 2016, 03:29:33 PM
Quote from: abolabo on February 18, 2016, 04:39:51 AM
i checked your admin and your case looks like:
you created some additional store, some customers registered in it, and then this additional store was deleted, but assignment "customer-to-store" still present.
Can you please check you database table "customers", column "store_id".
value must be the same as in table "stores".


The "stores" table has no records.
The value for "store_id" within "customers" table is 0 for all records.

If I were to create a record for the "stores" table, the store_id column is "AUTO_INCREMENT" so I don't know if I can enter the value of "0" ...plus what value is needed for the "alias" and "status" columns?

I tested the above, by using "status=1", but it did not fix the "Act on Behalf" issue.

you can use this sql to revert data of table stores
INSERT INTO `ac_stores` VALUES (0,'default','default',1);
where ac_ - your table prefix
Also check table "settings", key "config_url" value and compare with your admin URL.
"No one is useless in this world who lightens the burdens of another."
― Charles Dickens

helperbee

Within the "stores" table, the store_id column is "AUTO_INCREMENT" so when I ran the SQL the specified value of "0" was ignored. Instead it incremented to 4.

I checked the table "settings", key "config_url" value and it matched my admin URL.

What should I try next?

I very much appreciate your time and assistance. This is an important feature to our business.

abolabo

Quote from: helperbee on February 19, 2016, 12:00:58 PM
Within the "stores" table, the store_id column is "AUTO_INCREMENT" so when I ran the SQL the specified value of "0" was ignored. Instead it incremented to 4.

i guess cause is in it.

try to run this sql
DELETE FROM `ac_stores`;
Then
ALTER TABLE `ac_stores` AUTO_INCREMENT = 0;
and 
INSERT INTO `ac_stores` VALUES (0,'default','default',1);
"No one is useless in this world who lightens the burdens of another."
― Charles Dickens

helperbee

Sorry to report that didn't work. Even when auto_increment" was set to 0, the new value in "store_id" became 1. It was a good idea, however.
On my own, I tried setting the auto_increment to -1, but that SQL failed.

What do you recommend next?

abolabo

hm.. probably needs to change sql mode..
please try this one ..but run them all together... and do not forget change table prefix in it of course..

SET sql_mode='NO_AUTO_VALUE_ON_ZERO';
DELETE FROM `ac_stores`;
ALTER TABLE `ac_stores` AUTO_INCREMENT = 0; 
INSERT INTO `ac_stores` VALUES (0,'default','default',1);

"No one is useless in this world who lightens the burdens of another."
― Charles Dickens

helperbee

Thanks to your diligence, the latest sql was successful! Thank you! However, it did not fix the problem. Act on Behalf still requires a repeat login and fails with invalid token error. :'(


abolabo

hm.. can you give me ftp-access ?
"No one is useless in this world who lightens the burdens of another."
― Charles Dickens

G. O.

i have same issue on my new subdomain.webpage.tr on base v.1.4.0. php 8.3
What should be edited in my case ??
Thank you...
G.O.

Basara

Quote from: G. O. on November 25, 2024, 03:28:16 AM
i have same issue on my new subdomain.webpage.tr on base v.1.4.0. php 8.3
What should be edited in my case ??

Set both the store URL and secure URL to HTTPS. Logout from admin and close all tabs with AbanteCart pages. Clear the browser cache and try again.

Forum Rules Code of conduct
AbanteCart.com 2010 -