Print Page | Close Window

saved shopping carts message

Printed From: ProductCart E-Commerce Solutions
Category: ProductCart
Forum Name: Using ProductCart
Forum Description: Running your store with ProductCart
URL: https://forum.productcart.com/forum_posts.asp?TID=5107
Printed Date: 26-April-2024 at 11:13pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: saved shopping carts message
Posted By: prillo
Subject: saved shopping carts message
Date 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?



Replies:
Posted By: Guests
Date 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" rel="nofollow - http://wiki.earlyimpact.com/widgets/thirdparty/abandoned_cart



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net