This function will return the content type of the cart, usually for shipping purposes. It can be 'physical', 'virtual' or 'mixed' (some physical and some virtual products).
Here is a drop-in replacement for get_content_type() in class shopping_cart.php. In my opinion, functions longer than one screen (that's 50 lines for me) need to be rewritten, so I did (a long time ago). And, no, there's no point in upgrading. The logic is easy to understand if you're familiar with the ternary operator.
How do we know if a product is virtual? We check if there's a downloadable file. Admittedly somewhat restrictive, you can't download gift certificates but they would probably qualify as virtual for shipping purposes.
For osCommerce Hackers: The point of having the download file at the attributes level is to allow for a non downloadable (eg box) version.