am making a shopping cart app where I want to calculate the total price of the products present in the cart I made a function for it