The item and cart totals can be implemented by adding a couple of functions to the methods
section of cart.js
.
You can call methods from templates as follows:
<td>{{ getItemTotal(item) }}</td>
Where item
is the variable declared in the v-for
.
The grand total function will need to loop through all of the items and sum up the item totals.