Hi,
In last versions of opencart, cart is considered expired if is older than 1 hours and is not set customer_id
Check system/library/cart/cart.php and will find:
So, if you want to keep this "expired carts" for 7 days then change
In last versions of opencart, cart is considered expired if is older than 1 hours and is not set customer_id
Check system/library/cart/cart.php and will find:
Code: Select all
// Remove all the expired carts with no customer ID
$this->db->query("DELETE FROM " . DB_PREFIX . "cart WHERE customer_id = '0' AND date_added < DATE_SUB(NOW(), INTERVAL 1 HOUR)");
Code: Select all
// Remove all the expired carts with no customer ID
$this->db->query("DELETE FROM " . DB_PREFIX . "cart WHERE customer_id = '0' AND date_added < DATE_SUB(NOW(), INTERVAL 7 DAY)");
Same solution for the different code
Code: Select all
// Remove all the expired carts with no customer ID
$this->db->query("DELETE FROM " . DB_PREFIX . "cart WHERE (api_id > '0' OR customer_id = '0') AND date_added < DATE_SUB(NOW(), INTERVAL 1 HOUR)");
Code: Select all
// Remove all the expired carts with no customer ID
$this->db->query("DELETE FROM " . DB_PREFIX . "cart WHERE (api_id > '0' OR customer_id = '0') AND date_added < DATE_SUB(NOW(), INTERVAL 7 DAY)");
DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.
https://www.youtube.com/watch?v=zXIxDoCRc84
Who is online
Users browsing this forum: No registered users and 21 guests