Gold R12 SR1 bots update?

For general questions and discussions specific to the AbleCommerce GOLD ASP.Net shopping cart software.
Post Reply
User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Gold R12 SR1 bots update?

Post by AbleMods » Mon Oct 24, 2016 7:53 am

Did I read somewhere that SR1 for R12 had some sort of update for identifying bots so bots crawling a site did not create a ton of unwanted user records?

I can't find it in the release notes, but I swear I read it somewhere and now I can't find it.
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: Gold R12 SR1 bots update?

Post by jmestep » Mon Oct 24, 2016 9:36 pm

I'm not sure where the notes are, but the new code is in Services/Membership/WebUserLocator.cs

Code: Select all

               if (user == null)
                {
                    // LOOK FOR COOKIES IN REQUEST
                    bool foundCookies = !string.IsNullOrEmpty(request.ServerVariables["HTTP_COOKIE"]);
                    lock (_anonymousUserCreateLock)
                    {
                        if (foundCookies)
                        {
                            // THE USER IS NOT AUTHENTICATED OR NOT LOADED, USE THE ANONYMOUS ID AS THE USERNAME
                            user = UserDataSource.LoadForUserName(request.AnonymousID, true);
                        }
                        else
                        {
                            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);
                        }

                        if (user.Id == 0)
                            user.Save();
                    }
                }
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
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Gold R12 SR1 bots update?

Post by mazhar » Mon Oct 24, 2016 11:54 pm

It was fixed in R12 release. Check AC8-3042 in R12 change log here

http://help.ablecommerce.com/upgrades/a ... to_r12.htm

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

Re: Gold R12 SR1 bots update?

Post by AbleMods » Mon Oct 24, 2016 11:59 pm

That's what I was looking for, thanks Judy!

Thanks Mazhar, I looked there but obviously missed it ugh.

I've got a client using a marketing tool called SharpSpring. It requires a piece of javascript embedded into each page to handle page tracking. The javascript requires a unique ID for each shopper, so we've been using the shopper BasketId value as the ID parameter.

This broke after updating to R12 SR1. Most shoppers are getting the exact same ID value now. Which then breaks the SharpSpring implementation.

I don't have source for SR1, so I'll have to request it. I see changes were made to that code from R11 to R12, but can't tell if SR1 changed it again. Client was on R12, so I can only presume an SR1 change is the culprit.
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
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Re: Gold R12 SR1 bots update?

Post by AbleMods » Tue Oct 25, 2016 12:25 am

Ok I've found the SR1 files, there was no change to WebUserLocator.cs between R12 and SR1. So that path didn't lead anywhere.

Mazhar: From reading the code that Judy posted, it looks as if you're using the fact a cookie exists in the request to determine that the user is a human instead of a bot.

But, every brand new shopper to the site will meet that criteria, won't they? Their very first hit to a domain they've never visited will have no cookies in their first request. So doesn't the code as written above forcibly treat the first hit of every new shopper as a bot and give them the bot ID?

I understand every subsequent hit will have a cookie since Able will pass one back to the browser at the end of the first hit. But still, this design seems very presumptuous to me.
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

Post Reply