diff --git a/preview/pages/cart.astro b/preview/pages/cart.astro index 3371a1d17..9fb950e4c 100644 --- a/preview/pages/cart.astro +++ b/preview/pages/cart.astro @@ -10,6 +10,8 @@ import Avatar from '@ui/Avatar.astro' import Badge from '@ui/Badge.astro' import Button from '@ui/Button.astro' import Icon from '@ui/Icon.astro' +import ListGroup from '@ui/ListGroup.astro' +import ListGroupItem from '@ui/ListGroupItem.astro' import Payment from '@ui/Payment.astro' import Stepper from '@ui/Stepper.astro' import products from '@shared/data/products.json' @@ -44,6 +46,11 @@ const total = subtotal - discount + shipping + tax const money = (value: number): string => `$${value.toFixed(2)}` const providers: PaymentProvider[] = ['visa', 'mastercard', 'americanexpress', 'paypal', 'applepay'] + +const deliveries = [ + { id: 'standard', title: 'Standard', description: '3–5 business days', price: shipping, checked: true }, + { id: 'express', title: 'Express', description: 'Tomorrow before noon', price: 14, checked: false }, +] --- @@ -56,47 +63,33 @@ const providers: PaymentProvider[] = ['visa', 'mastercard', 'americanexpress', ' {lines.length} items. Prices include the discount code SPRING20. -
- - - - - - - - - - - - { - lines.map((line) => ( - - - - - - - - )) - } - -
ProductPriceQuantityTotalActions
-
- -
-
{line.name}
-
{line.variant}
- {line.quantity >= line.stock && } -
-
-
{money(line.price)} - - {money(line.price * line.quantity)} - -
-
+ + { + lines.map((line) => ( + +
+
+ +
+
+
{line.name}
+
+ {line.variant} · {money(line.price)} each +
+ {line.quantity >= line.stock && } +
+
+ +
{money(line.price * line.quantity)}
+ +
+
+
+ )) + } +
@@ -115,10 +108,39 @@ const providers: PaymentProvider[] = ['visa', 'mastercard', 'americanexpress', '
- +
- +
+ + SPRING20 + −{money(discount)} + +
+
+ +
Delivery
+
+ { + deliveries.map((delivery) => ( + + )) + } +
@@ -136,7 +158,7 @@ const providers: PaymentProvider[] = ['visa', 'mastercard', 'americanexpress', '
Total
{money(total)}
-
Free shipping on orders over {money(freeShippingFrom)}.
+
Includes {money(tax)} tax. Standard delivery is free on orders over {money(freeShippingFrom)}.