Improved retrieving of cart data to fix some notices.