tl; dr: Похоже, что нет никакого другого готового механизма для удаления записей кавычек, которые никогда не были преобразованы в заказы.
Модуль Mage_Sales
имеет запланированное задание для очистки истекших кавычек, но это удаляет только записи sales_flat_quote
, которые помечены как неактивные (т.е. is_active = 0
). Насколько мне известно, цитаты отмечены как неактивные, когда котировка преобразуется в заказ. Если это так, то таблица цитат будет только больше и больше.
Ref Mage_Sales_Model_Observer::cleanExpiredQuotes()
class Mage_Sales_Model_Observer
{
//...
public function cleanExpiredQuotes($schedule)
{
Mage::dispatchEvent('clear_expired_quotes_before', array('sales_observer' => $this));
$lifetimes = Mage::getConfig()->getStoresConfigByPath('checkout/cart/delete_quote_after');
foreach ($lifetimes as $storeId=>$lifetime) {
$lifetime *= 86400;
/** @var $quotes Mage_Sales_Model_Mysql4_Quote_Collection */
$quotes = Mage::getModel('sales/quote')->getCollection();
$quotes->addFieldToFilter('store_id', $storeId);
$quotes->addFieldToFilter('updated_at', array('to'=>date("Y-m-d", time()-$lifetime)));
$quotes->addFieldToFilter('is_active', 0);
foreach ($this->getExpireQuotesAdditionalFilterFields() as $field => $condition) {
$quotes->addFieldToFilter($field, $condition);
}
$quotes->walk('delete');
}
return $this;
}
//...
}