Staples ameliorates the problem by showing product recommendations on the shopping cart page, appropriately labeled "Try these similar products:"
The product recommendations are presented in a carousel, so the customer can actually surf many products without leaving the page.
While this is brilliant, I have a couple additional suggestions:
1. Add an "email me when item is restocked" feature.
2. Make the "Continue" button more clear on where it leads (continue through checkout, go back to the category, product page or home page?)
On the same topic, check out these articles:
3 Ways Retailers Handle Out of Stock Items Palmer Web Marketing Blog
5 Ways to Handle Returned to Stock Items