Order Details Block for Astro
Display order summaries to users
Use the OrderDetails
component to present users with a summary of their order, including product information, pricing, status, and invoice. They provide a streamlined user experience by making it easy for users to track their order’s progress or access receipts.
- Order ID1pxjyv0v
- Invoice number6876-10027
- ProductWebcore
- Payment methodvisa ending in 5556 (Expires: 2025/1)
The OrderDetails
component is split into two sections:
- sidebar: Details about the product, status, and pricing.
- main: Details about the order and transaction, such as ID, invoice, additional details or call to actions.
The details of the order inside the main section is split into two columns. This information is displayed in a single column if there are only 1 or 3 details provided for the component. You can change this behavior in the component here.
Inside the component you can specify any element to customize the body of your order details card. For example, you can use a Stepper
component to visualize next steps for the user:
- Download and loginUse your checkout email
-
Read our introductionReview key concepts
- LaunchStart using with clients
- Order ID1pxjyv0v
- Invoice number6876-10027
- ProductWebcore
- Payment methodvisa ending in 5556 (Expires: 2025/1)
Don’t forget to import your SVG icons if you use the Stepper
component with custom icons. You can read more about how to use the Stepper
component in its documentation.
Translations
You can use the translations
prop to translate the text for each hard-coded label:
- Your Order's ID:1pxjyv0v
- Your Invoice:6876-10027
- Product Name:Webcore
- Your Payment Details:visa ending in 5556 (Expires: 2025/1)
You can overwrite the default translations of the component in the component’s file by changes the values specified in the i18n
variable.
API
Button
component for the ButtonProps
type. Prop | Purpose |
---|---|
title | Sets a title for the page where the component is used. |
img | Specifies an image for the order. |
img.url | Sets the path for the image. |
img.alt | Sets an alternate text for the image. |
img.width | Sets the width of the image. |
img.height | Sets the height of the image. |
img.lazy | Set to true to lazy load the image. |
price | Sets the price of the order. |
paidOn | Sets the date when the order was fulfilled |
productDetailsLink | Provides a link back to the page of the ordered product. |
orderId | Sets the ID of the order that is displayed for reference to the user. |
product | Sets the name of the product shown next to the order ID. |
invoiceNumber | Sets the invoice number, shown under the order ID. |
paymentMethod | Sets the payment method, shown next to the invoice. |
cta | Sets a CTA button at the bottom of the order details. |
cta.text | Sets the label for the CTA. |
cta.icon | Sets an icon for the CTA. You can pass SVG strings, or an icon type for Astro components. |
translations | Sets the text of the hardcoded labels. Please see the translations section above for more details. |
className | Pass additional CSS classes for the component. |