How do you calculate total amount in cart?
Simple calculation method
The cart totals are calculated by summing each of the lines and then subtracting any discounts.
What is a cart total?
the sub total refers to total price of all products in the cart and the cart total is the amount after taxes and shipping.