Please help us to make AbanteCart Ideal Open Source Ecommerce Solution for everyone.

Support AbanteCart eCommerce

Author Topic: "Act on Behalf" not working  (Read 3716 times)

Offline helperbee

  • Jr. Member
  • **
  • Posts: 78
  • Karma: +2/-0
    • View Profile
"Act on Behalf" not working
« on: February 07, 2016, 03:22:31 PM »
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.

Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 1785
  • Karma: +249/-11
  • web for all, all for web!
    • View Profile
    • AbanteCart
Re: "Act on Behalf" not working
« Reply #1 on: February 07, 2016, 03:40:11 PM »
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

Offline helperbee

  • Jr. Member
  • **
  • Posts: 78
  • Karma: +2/-0
    • View Profile
Re: "Act on Behalf" not working
« Reply #2 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?

Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 4425
  • Karma: +206/-0
    • View Profile
Re: "Act on Behalf" not working
« Reply #3 on: February 18, 2016, 02:00:04 AM »
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
“Chuck Norris is so amazing.”
― Mother Teresa

Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 1785
  • Karma: +249/-11
  • web for all, all for web!
    • View Profile
    • AbanteCart
Re: "Act on Behalf" not working
« Reply #4 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".
“No one is useless in this world who lightens the burdens of another.”
― Charles Dickens

Offline helperbee

  • Jr. Member
  • **
  • Posts: 78
  • Karma: +2/-0
    • View Profile
Re: "Act on Behalf" not working
« Reply #5 on: February 18, 2016, 03:29:33 PM »
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.

Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 1785
  • Karma: +249/-11
  • web for all, all for web!
    • View Profile
    • AbanteCart
Re: "Act on Behalf" not working
« Reply #6 on: February 18, 2016, 03:53:46 PM »
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
 
Code: [Select]
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

Offline helperbee

  • Jr. Member
  • **
  • Posts: 78
  • Karma: +2/-0
    • View Profile
Re: "Act on Behalf" not working
« Reply #7 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 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.

Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 1785
  • Karma: +249/-11
  • web for all, all for web!
    • View Profile
    • AbanteCart
Re: "Act on Behalf" not working
« Reply #8 on: February 19, 2016, 01:17:07 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
Code: [Select]
DELETE FROM `ac_stores`;Then
Code: [Select]
ALTER TABLE `ac_stores` AUTO_INCREMENT = 0;and 
Code: [Select]
INSERT INTO `ac_stores` VALUES (0,'default','default',1);
“No one is useless in this world who lightens the burdens of another.”
― Charles Dickens

Offline helperbee

  • Jr. Member
  • **
  • Posts: 78
  • Karma: +2/-0
    • View Profile
Re: "Act on Behalf" not working
« Reply #9 on: February 19, 2016, 03:07:31 PM »
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?

Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 1785
  • Karma: +249/-11
  • web for all, all for web!
    • View Profile
    • AbanteCart
Re: "Act on Behalf" not working
« Reply #10 on: February 19, 2016, 04:00:10 PM »
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..

Code: [Select]
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

Offline helperbee

  • Jr. Member
  • **
  • Posts: 78
  • Karma: +2/-0
    • View Profile
Re: "Act on Behalf" not working
« Reply #11 on: February 19, 2016, 07:31:40 PM »
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. :'(


Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 1785
  • Karma: +249/-11
  • web for all, all for web!
    • View Profile
    • AbanteCart
Re: "Act on Behalf" not working
« Reply #12 on: February 20, 2016, 02:36:24 AM »
hm.. can you give me ftp-access ?
“No one is useless in this world who lightens the burdens of another.”
― Charles Dickens

 

Powered by SMFPacks Social Login Mod