AbleCommerce 7 How to Clean up anonymous users table

by Joe Payne 23. Julie 2010 14:59

Needed to find this for a client today, so I thought I would post it to the blog and (hopefully) make it easier to find the next time.

With older versions of AC7 i.e. 7.0.3 and earlier, there sometimes is an issue where user maintenance does not run completely through.  As days go on, this problem becomes more pronounced as the ac_Users table continues to grow.  At some point, you'll start noticing slow site performance and degradation.  Check your ac_Users table and you'll probably find hundreds of thousands of old user records.

This query will clean those out in one quick swoop.  After that, the user maintenance routine should be able to keep up.  Just change the date in the three query statements for the cutoff date you want.  Also make sure to set the database name for your particular installation at the beginning of the file.

USE <YourDBName>
DELETE FROM ac_Baskets
WHERE UserId IN (SELECT UserId FROM ac_Users WHERE StoreId = 1 AND IsAnonymous = 1
AND (AffiliateId IS NOT NULL OR ReferringAffiliateId IS NOT NULL)
AND (LastActivityDate IS NULL OR LastActivityDate <'June 30, 2009'))

DELETE FROM ac_Wishlists
WHERE UserId IN (SELECT UserId FROM ac_Users WHERE StoreId = 1 AND IsAnonymous = 1
AND (AffiliateId IS NOT NULL OR ReferringAffiliateId IS NOT NULL)
AND (LastActivityDate IS NULL OR LastActivityDate <'June 30, 2009'))

DELETE FROM ac_Users
WHERE StoreId = 1 AND IsAnonymous = 1
AND (AffiliateId IS NOT NULL OR ReferringAffiliateId IS NOT NULL)
AND (LastActivityDate IS NULL OR LastActivityDate <'June 30, 2009')

Tags: , ,

AC7 Articles

RMA Manager ideas for next release

by Joe Payne 17. Julie 2010 10:50

I'm thinking about new features I could add to the RMA Manager module.

Once thing that comes to mind is the ability to automatically re-order items being returned.  This could be easily tied to the Return Reason.  The thinking is that items returned for a specific reason could automatically be added to a new order for the same customer.  That would make it very handy to handle exchange returns.

Another idea is the ability to issue a specific kind of refund.  Right now the module shows you dollar amounts but doesn't offer a mechanism for the actual refund process.

Tags: ,

RMA Manager

AbleCommerce 7 Web Service progress report July 17 2010

by Joe Payne 17. Julie 2010 10:44

Well it's Saturday.  First it was Monday.  Then suddenly Friday afternoon was here and I just didn't get much done that I wanted.  Several phone calls got in the way as well as some programming research.  Now I'm spending a portion of my weekend getting some much needed bookkeeping work done. 

This should pave the way to put a big dent in the web service module next week.  I came up with a few new web service methods I'd like to add related to inventory items.  It adds more time to the module but I think it's a solid benefit and worth the delay.

I'd love to complain but business is great and the increased workload feels good.  It feels like a solid flow of work-in and work-out.  Having too much of one or the other just doesn't set well with me :)

Tags: ,

General News | Projects

AC7 Web Service code is done

by Joe Payne 9. Julie 2010 14:07

Finished the last of the routines I want to add to the Web Service.  Everything came out nicely.

Now for documentation, packaging, install testing and online catalog setup.

Tags: , ,

General News | New Products | Projects

I broke my AbleMods web site inquiry page

by Joe Payne 9. Julie 2010 10:47

Sorry folks, but if you've sent me a message from the Contact Us page on AbleMods.com in the past two weeks, please resend it.

My iPhone was stolen a few weeks ago, so I had to change all my passwords.  By all, I mean like 12-15 different accounts since I had that login information kept on the iPhone.  Apparently when I changed the email passwords for AbleMods.com accounts, I failed to update the AC7 site itself.

My bad :(

 

Tags: ,

General News | Personal | Tech Support

Month List