Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Abandoned Carts


Guest

Recommended Posts

I have been following this thread for some time now and am amazed at the amount of work and organizing Aalst, Met00 and JRWrestling have put in. Thanks guys. THey have delivered as promise so we should all be thankful.

 

I was wondering if the Cart Recapture Sales Tool will be a simple upgrade from the 1.7 version? I'm asking so I know if I should wait and download it all at once or download the 1.7 now and then upgrade after once the Recapture tool is available.

 

 

THanks guys, and I can't wait for the new release!

Two different products.

 

unsold_carts will remain as it is.

 

scart (the code scattered through this thread) will undergo a facelift so that it looks like the unsold_cart 1.7, but has all the functionality of the scart.

 

as part of that upgrade I am also looking at a series of reports that one will be able to do against the CRST (the code formerly known as scart) data.

 

B)

Link to comment
Share on other sites

  • Replies 211
  • Created
  • Last Reply

Top Posters In This Topic

As has been discussed by the developers, this topic thread is now "dead".

 

With the release of Unsold Carts Report 1.7 and the branching of the sales tool (to be named at a later date, but formerly known as scart) a new clean thread called Unsold Carts Report has been started at http://www.oscommerce.com/forums/index.php?showtopic=67196 that will deal only with the Unsold Carts Report from V1.7 forward.

 

When the sales tool is released as a contribution, this thread will be notated again with a pointer to that contribution.

 

 

B)

Link to comment
Share on other sites

Awsome tool. Just installed the scart code and the report and it works like a charm on Loaded5. Can't wait for the full contri.

 

I would however like to mention a small addition for storeowners like me who use Worldpay. As it is well known, some people fail to click "Continue" after being passed back from WP which means that the order never gets passed back to the store. The end result is a phonecall or e-mail to the customer asking them what they ordered. Not good.

 

I had this happen today and thought "I'll go take a look at abandon carts to see what they ordered". Works great and I now know what the customer had in his cart, just not what sizes !! If you could add something to make it show the attributes of the items in the cart that would be fantastic, and solve the problem for all the fed up WP customers like me.

Link to comment
Share on other sites

Awsome tool. Just installed the scart code and the report and it works like a charm on Loaded5. Can't wait for the full contri.

 

I would however like to mention a small addition for storeowners like me who use Worldpay. As it is well known, some people fail to click "Continue" after being passed back from WP which means that the order never gets passed back to the store. The end result is a phonecall or e-mail to the customer asking them what they ordered. Not good.

 

I had this happen today and thought "I'll go take a look at abandon carts to see what they ordered". Works great and I now know what the customer had in his cart, just not what sizes !! If you could add something to make it show the attributes of the items in the cart that would be fantastic, and solve the problem for all the fed up WP customers like me.

Well, the code is done and tested and all I have to do is pack it up for contribution (formerly the name will be recover_cart_sales.php). I added some features to the code (like it shows the date that you contacted them if you did so) and am including a basic report on how successful you were in conversion.

 

As for the ability to show attributes... attributes are painful. I'll look into it for a future release, but understand that it's not a high point on the priority list due to the pain involved with pulling them from the database.

Link to comment
Share on other sites

Hello everyone ! I added this contribution and find the following error. I really appreciate any advice... thanks.

 

Fatal error: Failed opening required 'includes/classes/currencies.php' (include_path='./:/usr/local/lib/php') in /home/mysite/mysite-www/admin/stats_unsold_carts.php on line 38

Link to comment
Share on other sites

On my version that I worked on with the original poster...I have a check box next to each cart..

 

Red is those I have emailed. Blue is for those who have already made a purchase.

Black are for those not yet contacted.

 

I go into this every couple days...click the carts I thought were nice and shoot off an email to them thats already in the php script saying one of two things..here is some of the code from my language file. Also you see on the bottom a space to enter custom text like a "P.S. place an order now and use coupon xxx for an extra $5 savings.

 

define('EMAIL_TEXT_NEWCUST', "\n\n".'Thank you for stopping by ' . STORE_NAME . ' and considering us for your purchase. We noticed that in your visit to our store that you placed the following item(s) in your shopping cart, but did not complete the transaction with us. ' . "\n\n" . 'Cart Contents:'."\n\n".'%s' . "\n\n" . 'We are always interested in knowing what happened and if there was a reason that you decided to not purchase with' . STORE_NAME . ' at this time. If you could be so kind as to let us know if you had any issues or concerns, we would like to address them as getting this feedback from you and others is how we can help make your experience at ' . STORE_NAME . ' better. '."\n\n". 'Again, thank you for your time and consideration in helping us make ' . STORE_NAME . ' a better place.'."\n\n". STORE_OWNER ."\n". STORE_NAME . "\n". HTTP_SERVER . DIR_WS_CATALOG . "\n");

define('EMAIL_TEXT_CUST', "\n\n".'First off, we would like to thank you for having purchased from ' . STORE_NAME . ' in the past. Secondly, we noticed in your recent visit to ' . STORE_NAME . ' that you placed the following item(s) in your shopping cart, but didn\'t complete the transaction with us. ' . "\n\n" . 'Cart Contents:'."\n\n".'%s' . "\n\n" . 'We are always interested in knowing what happened and if there was a reason you decided not to purchase with ' . STORE_NAME . ' at this time. If you could be so kind as to let us know if you had any issues or concerns we would like to address them as getting this feedback from you and others is how we can help make your experience at ' . STORE_NAME . ' better. '."\n\n". 'Again, thank you for your time and consideration in helping us make ' . STORE_NAME . ' a better place.'."\n\n". STORE_OWNER ."\n". STORE_NAME . "\n". HTTP_SERVER . DIR_WS_CATALOG . "\n");

Would you be willing to post your version in advance of the upcoming scarts version? This is exactly what I'd need to do with this mod.

 

thanks!

Link to comment
Share on other sites

this is my unsold_carts.php but I am not sure what will or will not work for you...you may have to comb the old thread to get it working correctly with whatever DB.

Use at your own risk. DO NOT CLUTTER THIS THREAD WITH SUPPORT QUESTIONS ABOUT THIS CODE!

DO NOT CLUTTER THIS THREAD WITH SUPPORT FOR THIS CODE. Instead start a new thread or PM me.

<?php
/*
 $Id: scart.php,v 2.0 2003/10/24 21:01:31 $

 scart contrib: JM Ivler (c)
 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Released under the GNU General Public License

*/

 require('includes/application_top.php');

 require(DIR_WS_CLASSES . 'currencies.php');
 $currencies = new currencies();

?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<?
function seadate($day) {
$ts = date("U");
$rawtime = strtotime("-".$day." days", $ts);
$ndate = date("Ymd", $rawtime);
return $ndate;
}
?>
<table border="0" width="100%" cellspacing="2" cellpadding="2">
 <tr>
   <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
   </table></td>
<!-- body_text //-->
   <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
     <tr>
       <td colspan=5><table border="0" width="100%" cellspacing="0" cellpadding="0">
         <tr>


<? if (count($custid) > 0 ) {  ?>
           <td class="pageHeading"><? echo HEADING_TITLE2; ?> </td>
           <td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
         </tr>
       </table></td>
     </tr>
<!-- <tr><td colspan=5> <? if (count($custid) > 0 ) { foreach ($custid as $cid) { echo "gotem ".$cid."<br>";}} ?></td></tr> -->
     <tr>
       <td class="smallText">
      <tr class="dataTableHeadingRow"> 
       <td colspan=5 class="dataTableHeadingContent">Customer</td> 
      </tr>

<?php 
   if (count($custid) > 0 ) { 
     foreach ($custid as $cid) { 
 $query1 = 
     tep_db_query("select cb.products_id as pid, cb.customers_basket_quantity as qty,  cb.customers_basket_date_added as bdate, cus.customers_firstname as fname, cus.customers_lastname as lname, cus.customers_email_address as email from customers_basket as cb, customers as cus where cb.customers_id = cus.customers_id  and cus.customers_id = '".$cid."' order by cb.customers_basket_date_added desc ");
 $knt = mysql_num_rows($query1);
 for ($i = 0; $i < $knt; $i++) {
   $inrec = tep_db_fetch_array($query1);
//     echo " ~~ " .$inrec['fname']." ".$inrec['lname']." ~~ ".$inrec['bdate']. " ~~ ".$inrec['email']." ~~ ".$inrec['pid']." ~~ ".$inrec['qty'].   "<br>";
// set new cline and curcus
   if ($lastcid != $cid) 
    $cline = "<tr><td valign=top colspan=2><hr size=1 color=000080></td></tr><tr><td valign=top>".$inrec['fname']." ".$inrec['lname']." <br>".$inrec['email']."</td><td>";
    $lastcid = $cid;
// empty the shopping cart
 $query2 = tep_db_query("select p.products_price as price, pd.products_name as name from products as p, products_description as pd where p.products_id = '".$inrec['pid']."' and pd.products_id = p.products_id");
 $inrec2 = tep_db_fetch_array($query2);
 $cline .= $inrec['qty']." x ".$inrec2['name']."<br>";
 $mline .= $inrec['qty']." x ".$inrec2['name']."\n";
 }
 
  $cline .= "</td></tr>";
//
// send the e-mail - this requires a few things be done in 
//              includes/languages/english/scart.php to support the message
//
 $cquery = tep_db_query("select * from orders where customers_id = '".$cid."'" );

 if (mysql_num_rows($cquery) < 1) {
$email = STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" . tep_catalog_href_link(FILENAME_CATALOG_LOGIN, '', 'SSL') . "\n" . sprintf(EMAIL_TEXT_CUST, $mline) . "\n" . $_POST['message'];
 } else {
$email = STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" . tep_catalog_href_link(FILENAME_CATALOG_LOGIN, '', 'SSL') . "\n" . sprintf(EMAIL_TEXT_CUST, $mline) . "\n" . $_POST['message'];
 }
$custname = $inrec['fname']." ".$inrec['lname'];
tep_mail($custname, $inrec['email'], EMAIL_TEXT_SUBJECT, $email, STORE_NAME, STORE_OWNER_EMAIL_ADDRESS);
  $mline = "";
tep_db_query("insert into " . TABLE_SCART . " (customers_id, dateadded ) values ('" . $cid . "', '" . seadate('0') . "')");
  
echo $cline;
  $cline = "";
}
}
 echo "<tr><td colspan=4 align=right><a href=".$PHP_SELF."><h2>Return to Report</h2></a></td></tr>";
} else { 
// 
// we are doing the Report
//
 $tdate = $_POST['tdate'];
 if ($_POST['tdate'] == '') $tdate = '10';
 $ndate = seadate($tdate);
//  echo $ndate; // debug line, shows the date we are seeking
?>
           <td class="pageHeading"><? echo HEADING_TITLE2; ?> </td>
           <td class="pageHeading" align="right"><form method=post action=<? echo $PHP_SELF;?> > <table><tr><td>Last </td><td><input type=text size=4 width=4 value=<? echo $tdate; ?> name=tdate> </td><td>Days </td><td><input type=submit value="New Run"> </td></tr></table></form> <?php echo tep_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
         </tr>
       </table></td>
     </tr>
     <tr>
       <td class="smallText">
      <tr class="dataTableHeadingRow"> 
       <td class="dataTableHeadingContent">e-mail</td> 
       <td class="dataTableHeadingContent">Customer</td> 
       <td class="dataTableHeadingContent" colspan="1" width="150">Cart</td> 
      </tr><form method=post action=<? echo $PHP_SELF; ?>>

<?php 
 $tdate = $_POST['tdate'];
 if ($_POST['tdate'] == '') $tdate = '10';
 $ndate = seadate($tdate);
//  echo $ndate; // debug line, shows the date we are seeking
 $query1 = 
     tep_db_query("select cb.customers_id as cid, cb.products_id as pid, cb.customers_basket_quantity as qty,  cb.customers_basket_date_added as bdate, cus.customers_firstname as fname, cus.customers_lastname as lname, cus.customers_telephone as phone, cus.customers_email_address as email from customers_basket as cb, customers as cus where cb.customers_basket_date_added >= '".$ndate."' and cb.customers_id = cus.customers_id order by cb.customers_basket_date_added desc, cb.customers_id ");
 $results = 0;
 $fcolor = "000000";
 $curcus = "";
 $tprice = 0;
 $knt = mysql_num_rows($query1);
 for ($i = 0; $i < $knt; $i++) {
    $inrec = tep_db_fetch_array($query1);
//     echo " ~~ ".$curcus." == ".$inrec['cid']." ~~ " .$inrec['fname']." ~~ ";
    if ($curcus != $inrec['cid']) {
// output line 
      $cline .= "<tr><td><b>Total: </b>".$tprice."</td></tr></table></td></tr>";
      if ($curcus != "") echo $cline;
// set new cline and curcus
      $curcus = $inrec['cid'];
      $tprice = 0;
 $donequery = 
     tep_db_query("select * from ". TABLE_SCART ." where customers_id = '".$inrec['cid']."'");
      $fcolor = "000000";
      $customer = "";
      $emailttl = seadate(EMAIL_TTL);
      if (mysql_num_rows($donequery) > 0) {
       $ttl = tep_db_fetch_array($donequery);
       if ($emailttl <= $ttl['dateadded']) $fcolor = "ff0000";
      }
      $cquery = tep_db_query("select * from orders where customers_id = '".$inrec['cid']."'" );
      if (mysql_num_rows($cquery) > 0) $customer = "<br><font color=blue> Previous Customer</font>";
      $cline = "<tr><td valign=top colspan=3><hr size=1 color=000080></td></tr><tr><td width=10 valign=top><input type=checkbox name=custid[] value=".$curcus."></td> <td valign=top><font color=".$fcolor.">".$inrec['fname']." ".$inrec['lname']."</font> ".$inrec['phone'].$customer."<br><a href=mailto:".$inrec['email'].">".$inrec['email']."</a></td><td><table>";
    }
// empty the shopping cart
 $query2 = 
     tep_db_query("select p.products_price as price, pd.products_name as name from products as p, products_description as pd where p.products_id = '".$inrec['pid']."' and pd.products_id = p.products_id");
 $inrec2 = tep_db_fetch_array($query2);
 $tprice = $tprice + ($inrec['qty'] * $inrec2['price']);  
 $cline .= "<tr><td class=smalltext>".$inrec['qty']." x ".$inrec2['name']." @ ".$inrec2['price']." (".$inrec['bdate'].")</td><tr>";
 }
 
  $cline .= "<tr><td><b>Total: </b>".$tprice."</td></tr></table></td></tr>";
  echo $cline;

?>
<tr><td colspan=3>
<?php echo tep_draw_textarea_field('message', 'soft', '80', '5'); ?>
<input type=submit value="Send E-Mail"></td></tr>
</form>
<? } 
//
// end footer of both e-mail and report
//
?>
    </tr> 
   </table> 
  </td> 
  </tr> 
 </table></td> 
<!-- body_text_eof //--> 
</tr> 
</table> 
<!-- body_eof //--> 

<!-- footer //--> 
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?> 
<!-- footer_eof //--> 
<br> 
</body> 
</html> 
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...