Hernando Abella

E-commerce Storefront · Step 5 of 7

Show a trustworthy cart summary

Display line totals, item count, and subtotal. Keep tax and shipping assumptions visible; do not imply that a mock checkout processes a real payment.

Understand

Derived totals should be calculated from cart data so they cannot drift out of sync.

Build

Calculate each line total and subtotal from integer minor units. Add clear empty-cart and invalid-quantity states.

Check

Changing a quantity updates every related total, and removing the last item returns to the empty state.

Try it

Try a quantity large enough to expose formatting or layout problems.