calculate total price with js