Anyone ever seen this issue?

For general questions and discussions specific to the AbleCommerce GOLD ASP.Net shopping cart software.
Post Reply
User avatar
compunerdy
Admiral (ADM)
Admiral (ADM)
Posts: 1283
Joined: Sun Nov 18, 2007 3:55 pm

Anyone ever seen this issue?

Post by compunerdy » Mon Dec 11, 2017 5:11 am

I had at least one customer say he goes to the store and it shows someone else's stuff in his cart.. he hits refresh and it goes away.

User avatar
Katie
AbleCommerce Admin
AbleCommerce Admin
Posts: 2651
Joined: Tue Dec 02, 2003 1:54 am
Contact:

Re: Anyone ever seen this issue?

Post by Katie » Mon Dec 11, 2017 11:07 pm

It sounds like he might be on a shared computer. If he went to your website after someone else had recently been shopping there, it would explain why he saw a cart with items. The refresh action probably cleared the session. It is weird for sure and anyone's guess.
Thank you for choosing AbleCommerce!

http://help.ablecommerce.com - product support
http://wiki.ablecommerce.com - developer support

User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Re: Anyone ever seen this issue?

Post by AbleMods » Thu Dec 21, 2017 6:24 am

I've seen it before.

Able's request handler has a piece of 'bot' detection code. The idea was to alleviate an issue with bots that crawl the site without including the user cookie provided by Able on the response of the first page hit. When the cookie is not included, every single page hit would generate a new anonymous user record in the ac_Users table. This would bloat ac_Users over time, especially when it's a PCI Compliance bot hitting the site every-which-way-but-Sunday.

Able's code does a quick check to see if the user looks like a bot. If it does, Able assigns a default 'bot user' account as the user for the duration of the page hit instead of generating a whole new user record.

The problem is that the bot detection code isn't 100% accurate. So (very rarely) a false positive occurs and a normal shopper gets the default user record. Always only on the first page hit. And after that, it's fine from then on.

This default user account can have a really wonky basket, sometimes hundreds or thousands of items in it. Freaks people out when they see it :D
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: Anyone ever seen this issue?

Post by jmestep » Mon Dec 25, 2017 11:10 pm

Katie,
What about if you add code to clear the bot's basket right after you detect a bot?
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Re: Anyone ever seen this issue?

Post by AbleMods » Tue Jan 16, 2018 3:51 am

Judy this is what I did in /Services/Membership/WebUserLocator.cs:

Code: Select all

                            Guid guid = AlwaysConvert.ToGuid(context.Application["BOT_USER_GUID"], Guid.Empty);
                            if (guid == Guid.Empty)
                            {
                                guid = Guid.NewGuid();
                                context.Application["BOT_USER_GUID"] = guid;
                            }

                            // USE BOT USER GUID AS USER NAME
                            user = UserDataSource.LoadForUserName(guid.ToString(), true);
                            // BEGIN MOD: AbleMods.com
                            // DATE:  01/05/2018
                            // clear out the basket of the bot user account
                            if (user != null)
                            {
                                IBasketService basketService = AbleContext.Resolve<IBasketService>();
                                basketService.Clear(user.Basket);
                            }
                            // END MOD: AbleMods.com
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

User avatar
Katie
AbleCommerce Admin
AbleCommerce Admin
Posts: 2651
Joined: Tue Dec 02, 2003 1:54 am
Contact:

Re: Anyone ever seen this issue?

Post by Katie » Fri Jan 19, 2018 2:15 pm

Sorry, I missed these last few updates. I'll report this as a bug.

Thanks
Thank you for choosing AbleCommerce!

http://help.ablecommerce.com - product support
http://wiki.ablecommerce.com - developer support

User avatar
Katie
AbleCommerce Admin
AbleCommerce Admin
Posts: 2651
Joined: Tue Dec 02, 2003 1:54 am
Contact:

Re: Anyone ever seen this issue?

Post by Katie » Tue Jan 23, 2018 1:06 am

Thanks. This is reported as AC8-3267
Thank you for choosing AbleCommerce!

http://help.ablecommerce.com - product support
http://wiki.ablecommerce.com - developer support

Post Reply