Complete reference for all Ollie Shop hooks to access checkout data and actions
Property | Type | Description |
---|---|---|
items | CartItem[] | Array of products in cart |
total | number | Total amount in cents |
subtotal | number | Subtotal before shipping/tax |
shipping | number | Shipping cost in cents |
tax | number | Tax amount in cents |
discount | number | Total discount amount |
currency | string | Currency code (USD, EUR, etc.) |
Property | Type | Description |
---|---|---|
id | string | Unique product identifier |
name | string | Product name |
price | number | Price per unit in cents |
quantity | number | Quantity in cart |
image | string | Product image URL |
category | string | Product category |
sku | string | Stock keeping unit |
Property | Type | Description |
---|---|---|
id | string | Unique payment method ID |
name | string | Display name (Credit Card, PayPal) |
type | string | Method type (card, wallet, bank) |
icon | string | Payment method icon URL |
fee | number | Processing fee in cents |
isAvailable | boolean | Whether method is available |
Property | Type | Description |
---|---|---|
id | string | Unique shipping method ID |
name | string | Display name (Standard, Express) |
description | string | Method description |
price | number | Shipping cost in cents |
estimatedDays | number | Delivery time in days |
estimatedDelivery | string | Formatted delivery date |
carrier | string | Shipping carrier name |
isAvailable | boolean | Whether option is available |
Property | Type | Description |
---|---|---|
colors.primary | string | Primary brand color |
colors.secondary | string | Secondary color |
colors.background | string | Background color |
colors.text | string | Text color |
colors.onPrimary | string | Text color on primary background |
fonts.heading | string | Heading font family |
fonts.body | string | Body text font family |
spacing.small | string | Small spacing value |
spacing.medium | string | Medium spacing value |
spacing.large | string | Large spacing value |
borderRadius | string | Default border radius |
🔄 Combining Multiple Hooks
⚡ Performance Optimization
🛡️ Error Handling
useCheckoutSession
for basic cart/customer data, then add other hooks as needed. The hooks are designed to work together seamlessly.