In the digital transformation era, increasingly more individuals and organizations use or create services in digital spaces. Many business transactions have been moving from the offline to online mode. For example, sellers intend to introduce their products on e-commerce platforms rather than display them on store shelves as in traditional business. Although this new format business has advantages, such as more space for product displays, more efficient searches for a specific item, and providing a good tool for both buyers and sellers to manage their products, it is also accompanied by the obviously important problem that users are confused when choosing an appropriate item due to a large amount of information. For this reason, the need for a recommendation system appears. Informally, a recommender system is similar to an information filtering system that helps identify a set of items that best satisfy users' demands based on their preference profiles. The integration of contextual information (e.g., location, weather conditions, and user's mood) into recommender systems to improve their performance has recently received considerable attention in the research literature. However, incorporating such contextual information into recommendation models is a challenging task because of the increase in both the dimensionality and sparsity of the model. Different approaches with their own advantages and disadvantages have been proposed. This paper provides a comprehensive survey on context-aware recommender systems in recent years. In particular, the authors pay more attention to journal and conference proceedings papers published from 2016 to 2020. In addition, this paper also presents open issues for context-aware recommender systems and discuss promising directions for future research.