Using calculations and conditions for the total price