Not sure how relevant this will be, but you might want to check the Sharing Cart plugin. I haven't used it myself, but it sounds like what you're looking for...
https://moodle.org/plugins/view.php?id=557
https://moodle.org/plugins/view.php?id=557