Function to get total price of cart