dbTableName = Config::$db_tables['checkouts']; } function _insert($cart_id, $contact_id, $ship_method, $promotion_id=0, $order_id=0) { $ins = "INSERT INTO ".Config::$db_tables['checkouts']." VALUES(NULL, NOW(), '$cart_id', '$ship_method', '$contact_id', '$promotion_id', '$order_id')"; return(Database::ado_execute_query($ins, 'Checkouts::_insert')); } function search_by_cart_id($cart_id) { // return checkout id if there is one for the cart id. if multiples return latest one. otherwise return false return(Database::ado_get_one("SELECT id FROM checkouts WHERE cart_id='$cart_id' ORDER BY id DESC")); } } ?>