In any ecommerce store you’ll get customers that never checkout with their cart.

Recently we were asked about how to determine the number of abandoned carts in Cart Viper, this is something we’ve got on the road map for a later release (built-in report to display the number of abandoned carts).
So we’ve created this simple script that you can execute using the Host – SQL page within your DotNetNuke portal.

declare @portalId int
 
--set this value to the portalId to report
--abandoned carts
set @portalId=0
 
select cast(floor(cast(c.datecreated  as float)) as datetime) as Date,
  count(distinct c.cartId) as Count
from {databaseOwner}[{objectQualifier}cvstore_cart] c
inner join {databaseOwner}[{objectQualifier}cvstore_cartItems] ci on c.cartId=ci.cartId
where portalId=@portalId
group by cast(floor(cast(c.datecreated  as float)) as datetime)
order by cast(floor(cast(c.datecreated  as float)) as datetime)

 

Executing the script will display the abandoned cart count broken down by date. Notice that you can define the portalID to report on by setting the value of the set @portalId=0 line.

Just copy the script into the text area, update the portalId to the correct value then click Execute to display the results.

Abandoned carts statistics script