Prepare the cart for AJAX