ProductCart E-Commerce Solutions Homepage
Forum Home Forum Home > ProductCart > Using ProductCart
  New Posts New Posts RSS Feed - saved shopping carts message
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

saved shopping carts message

 Post Reply Post Reply
Author
Message
prillo View Drop Down
Newbie
Newbie


Joined: 30-June-2011
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote prillo Quote  Post ReplyReply Direct Link To This Post Topic: saved shopping carts message
    Posted: 20-April-2012 at 8:40pm
Hi,

I get the message in my CP once every few days that the saved shopping carts exceeds 10,000, and I have the option of removing the oldest carts.

If I didn't do this bit of housekeeping, what would happen?  Slower response time?  Just curious as I have had to ignore it now and then when it pops up (busy with other things).

Also is there any way to preset this so that it automatically drops the 10,001th oldest cart and up?
Back to Top
Guests View Drop Down
Guest
Guest
Post Options Post Options   Thanks (0) Thanks(0)   Quote Guests Quote  Post ReplyReply Direct Link To This Post Posted: 21-April-2012 at 8:52pm
There actually is a pretty easy way to manage this automatically.

ProductCart has a routine it runs monthly to clean up some statistics data is stores on items added to cart. It checks for whether it's time to run the clean up again every time an item is added to cart.

In pc/inc_SaveShoppingCart.asp look for the following around line 170:
query="DELETE FROM pcSavedPrdStats;"
set rsQ=connTemp.execute(query)
set rsQ=nothing
end if
Right before the "end if", add the following:
'<Customization: Purge old saved carts>
ndays=30
ndays=-1*Clng(ndays)
if scDB="SQL" then
strDtDelim="'"
else
strDtDelim="#"
end if
query="DELETE FROM pcSavedCartArray WHERE pcSavedCartArray.SavedCartID IN (SELECT SavedCartID FROM pcSavedCarts WHERE SavedCartDate<" &strDtDelim&dateadd("d",ndays,Now())&strDtDelim& ");"
set rstemp=connTemp.execute(query)
set rstemp=nothing
query="DELETE FROM pcSavedCarts WHERE SavedCartDate<" &strDtDelim&dateadd("d",ndays,Now())&strDtDelim& ";"
set rstemp=conntemp.execute(query)
set rstemp=nothing
'</Customization>
Change "ndays=30" to however many days back you want to retain saved carts.

You also might want to take advantage of this add-on to automatically follow up on all of these abandoned carts you've got: http://wiki.earlyimpact.com/widgets/thirdparty/abandoned_cart
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.031 seconds.