How to calculate total based on user selections?