Action for a total sum


How can I easily implement the expression or some rule to multiply the total sum, as I have the quantity of an item and the unit price of it. For instance, a customer pick 3 items of a product, in the client form must be a line where showed the total cost for the whole order of 3 products. As I've already surfed through the rules (xpath assignme, adding assignment) I couldn't find exactly what I'm looking for.

Thank you