Velocity X Components

E-Commerce

Cart Summary / Order Totals

Order totals block listing subtotal, shipping, tax and discount rows that only render when passed, plus a grand total.

Subscription Included with the Velocity Components subscription.
bash
$ velocityx add cart-summary

Built for astro.

Full docs for Cart Summary / Order Totals →

Needs a licence key — subscribe here, then velocityx loginonce.

astro v1.0.0
Cart Summary / Order Totals
Subtotal $318.00
Shipping Free
Tax $31.80
Discount -$20.00
Total $329.80

Props

NameTypeRequiredDefaultDescription
subtotalnumberYes
shippingnumber | nullNonull
taxnumberNo
discountnumberNo
totalnumberYes
currencystringNo'AUD'
localestringNo'en-AU'
classNamestringNo''

File this creates

The CLI writes this path into your project, relative to its root — nothing else moves.

text
components/velocity/cart-summary/CartSummary.astro

Using the Cart Summary / Order Totals component

Install it with velocityx add cart-summary. The CLI writes the source straight into your project — no runtime dependency, no registry lock-in, and it themes itself from the same primary-*/accent-* scale as the rest of the library.

More from E-Commerce.