The final change we need to make to the shopping cart itself is to display the calculated grand total at the bottom. As it stands, we have no means of calculating it, so we're just displaying a hardcoded £0.00 value instead. To fix this, we'll add a Vuex getter to our store, which will calculate the total in a reusable function that we can use anywhere in our application.
Getters have a similar use case as computed properties: creating derived state for specific display purposes. In this case, the grand total of the shopping cart is the sum of a specific calculation on each cart item. We could store the grand total as a state property, but we'd then have the overhead of remembering to keep it up to date after any mutation has run that could alter that value. Instead, we derive the value from the cart items, and as they...