used the pre-fetched courses in shoppingcart_items instead of an additional query.