I'm currently using Recover Cart sales because it gives reporting on what sales were recovered due to emails sent out. I just installed the Cart Reminder Module as well and would like to have them work together. I think all that has to be done is a modification to cart_reminder_cron.php this file will need to set customer as contacted in rover cart module.
The code from recover cart module that does this I believe is located in file admin/recover_cart_sales.php
The part of the file/code that seems to set customers as contacted is:
// Set Contacted Begin
if ($_GET['action'] == 'setconacted') {
$customer = $db->Execute("SELECT customers_firstname, customers_lastname
FROM " . TABLE_CUSTOMERS . "
WHERE customers_id ='" . (int)$_GET['customer_id'] . "' LIMIT 1");
// See if a record for this customer already exists; if not create one and if so update it
$donequery = $db->Execute("SELECT * FROM ". TABLE_SCART ." WHERE customers_id = '" . (int)$_GET['customer_id'] . "'");
if ($donequery->RecordCount() == 0)
$db->Execute("INSERT INTO " . TABLE_SCART . " (customers_id, dateadded, datemodified) VALUES ('" . (int)$_GET['customer_id'] . "', '" . date('Ymd') . "', '" . date('Ymd') . "')");
else
$db->Execute("UPDATE " . TABLE_SCART . " SET datemodified = '" . date('Ymd') . "' WHERE customers_id = " . (int)$_GET['customer_id']);
$messageStack->add(MESSAGE_STACK_CUSTOMER . $customer->fields['customers_firstname'] . ' ' . $customer->fields['customers_lastname'] . ' (ID ' . $_GET['customer_id'] . ')' . MESSAGE_STACK_SETCONACTED, 'success');
}
// Set Contacted End
I tried adding the following to cart_reminder_cron.php:
require('includes/application_top.php');
require(DIR_WS_CLASSES . 'currencies.php');
$customer = $db->Execute("SELECT customers_firstname, customers_lastname
FROM " . TABLE_CUSTOMERS . "
WHERE customers_id ='" . (int)$_GET['customer_id'] . "' LIMIT 1");
// See if a record for this customer already exists; if not create one and if so update it
$donequery = $db->Execute("SELECT * FROM ". TABLE_SCART ." WHERE customers_id = '" . (int)$_GET['customer_id'] . "'");
if ($donequery->RecordCount() == 0)
$db->Execute("INSERT INTO " . TABLE_SCART . " (customers_id, dateadded, datemodified) VALUES ('" . (int)$_GET['customer_id'] . "', '" . date('Ymd') . "', '" . date('Ymd') . "')");
else
$db->Execute("UPDATE " . TABLE_SCART . " SET datemodified = '" . date('Ymd') . "' WHERE customers_id = " . (int)$_GET['customer_id']);
but it is not working? Anyone know why?