Identify Abandoned Cart Users IP address?

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
Ron
Ensign (ENS)
Ensign (ENS)
Posts: 13
Joined: Thu Nov 13, 2008 8:38 am

Identify Abandoned Cart Users IP address?

Post by Ron » Tue Jun 01, 2010 3:35 pm

I am seeing a problem on our site with an abandoned basket for a registered user.

I know the user and they have not been in the site putting items in a basket. But someone has picked up their user ID and is doing so. I could narrow down where this is coming from, if I could get the IP address associated with the visit.

Can anyone suggest how I might get that info? They aren't smart enough to spoof the IP address so it should give me a good idea where it originates.

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Identify Abandoned Cart Users IP address?

Post by mazhar » Wed Jun 02, 2010 5:52 am

Yes it would be easy. IP information is available for order in AbleCommerce and also it provides you the ability to ban different IP ranges. In your case you need IP address prior to order when some one tries to add products to basket. You can found a small conlib control in attachment. All you need is to place this control under ConLib/Custom folder and then make use of it on product scriptlet. Simply edit product page content scriptlet and include this control there like

Code: Select all

[[ConLib:Custom/IPLogger]]
Now when some one will visit any product page then its IP will be logged in ac_Users table's comment field. So you can check the user's table comment field to figure out his IP.

Ron
Ensign (ENS)
Ensign (ENS)
Posts: 13
Joined: Thu Nov 13, 2008 8:38 am

Re: Identify Abandoned Cart Users IP address?

Post by Ron » Wed Jun 02, 2010 6:54 am

Mazhar,

Wouldn't that only work if an order was created? This situation is resulting in abandoned baskets as I think they haven't figured out how to pay for an order yet under the assumed users card yet (if they are going to, they may just want to screw with creating abandoned baskets).

You mentioned blocking specific IP ranges for visitors. If I can capture and display the IP address on an abandoned basket report or somewhere it can be queried, I implement the block in the IPLogger ConLib scriptlet ? I haven't looked at the scriptlet yet.

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Identify Abandoned Cart Users IP address?

Post by mazhar » Wed Jun 02, 2010 7:17 am

Actually the mod I posted in this thread is not specific to order. I will always store IP in user's comment field for any one who visits any product page. So all you need is to check from abandoned baskets that who is user for that basket and then look into comment field to figure out his IP. Let's make it little easier, right now we don't expose comment field to UI. Go to your Admin/Reports/DailyAbandonedBaskets.aspx file and locate following code

Code: Select all

<asp:TemplateField HeaderText="Last Activity">
                                    <HeaderStyle HorizontalAlign="Left" />
                                    <ItemTemplate>
                                        <asp:Label ID="Label3" runat="server" Text='<%# Eval("LastActivity") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
and update it as below

Code: Select all

<asp:TemplateField HeaderText="Last Activity">
                                    <HeaderStyle HorizontalAlign="Left" />
                                    <ItemTemplate>
                                        <asp:Label ID="Label3" runat="server" Text='<%# Eval("LastActivity") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="IP Address">
                                    <HeaderStyle HorizontalAlign="Left" />
                                    <ItemTemplate>
                                        <asp:Label ID="Label3" runat="server" Text='<%# GetIPAddress(Container.DataItem) %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
Then edit Admin/Reports/DailyAbandonedBaskets.aspx.cs file and add following code just above the last closing curly brace

Code: Select all

protected string GetIPAddress(Object dataItem)
    {
        CommerceBuilder.Reporting.BasketSummary basketSummary = (CommerceBuilder.Reporting.BasketSummary)dataItem;
        CommerceBuilder.Orders.Basket basket = CommerceBuilder.Orders.BasketDataSource.Load(basketSummary.BasketId);
        return basket.User.Comment;
    }
That's it. Keep in mind that these changes will be effective only on upcoming baskets we have no way to figure problem IP for old ones. To test it you need to make use of IPLogger control on your product page. Then from store side open some product details page and add that to basket with some normal customer account. Then change your machine date to two days ahead this will make the basket abandoned . Now login using admin account and see abandoned basket report and then open daily abandoned baskets report. You will see customer IP against abandoned basket record.

Ron
Ensign (ENS)
Ensign (ENS)
Posts: 13
Joined: Thu Nov 13, 2008 8:38 am

Re: Identify Abandoned Cart Users IP address?

Post by Ron » Wed Jun 02, 2010 7:40 am

Thank you, we'll give that a shot.

User avatar
mfreeze
Commodore (COMO)
Commodore (COMO)
Posts: 421
Joined: Mon Jan 24, 2005 2:07 pm
Location: Washington, NJ
Contact:

Re: Identify Abandoned Cart Users IP address?

Post by mfreeze » Tue Feb 08, 2011 4:59 pm

After putting the IPLOGGER conlib into the product page, how would I retrieve and display the comment field in the basket?
Mary E Freeze

Freeze Frame Graphics
Web Hosting and Design, ASP and CFMX Development

http://www.ffgraphics.com

cherilyn
Ensign (ENS)
Ensign (ENS)
Posts: 1
Joined: Wed Jul 13, 2011 11:40 pm

Re: Identify Abandoned Cart Users IP address?

Post by cherilyn » Wed Jul 20, 2011 3:57 am

What is the best free software for displaying a different IP address? I am looking for a good way to keep my anonymity online by having a different IP address shown to websites. For security reasons, I no longer want my current IP address to display when I visit certain websites. What is the best way to do this? Thanks!
___________________________
yahoo keyword tool ~ overture ~ traffic estimator ~ adwords traffic estimator

Post Reply