Skip to main content

Interface: CartSummaryProps

Defined in: components/CartSummary.tsx:17

Properties

afterRequestAuthorization?

optional afterRequestAuthorization?: (cart) => void

Defined in: components/CartSummary.tsx:67

Fires after authorization request is sent; receives the updated cart

Parameters

cart

Cart

Returns

void


cart

cart: Cart

Defined in: components/CartSummary.tsx:19

The shopping cart used to populate the cart summary data


companyId?

optional companyId?: number

Defined in: components/CartSummary.tsx:63

Active company ID — used to look up the user's PAC for this company


currency?

optional currency?: string

Defined in: components/CartSummary.tsx:55

Currency symbol for prices. Resolved from PropellerProvider when omitted; defaults to '€'.


formatPrice?

optional formatPrice?: (price) => string

Defined in: components/CartSummary.tsx:52

Custom price formatting function

Parameters

price

number

Returns

string


graphqlClient?

optional graphqlClient?: GraphQLClient

Defined in: components/CartSummary.tsx:58

GraphQL client — required for the default requestPurchaseAuthorization handler


labels?

optional labels?: Record<string, string>

Defined in: components/CartSummary.tsx:25

Labels for the component


onCheckoutButtonClick?

optional onCheckoutButtonClick?: (cart) => void

Defined in: components/CartSummary.tsx:49

Action handler when the checkout button is clicked

Parameters

cart

Cart

Returns

void


onError?

optional onError?: (err) => void

Defined in: components/CartSummary.tsx:70

Called when requestPurchaseAuthorization fails; receives the error

Parameters

err

Error

Returns

void


onRequestAuthorization?

optional onRequestAuthorization?: (cart) => void

Defined in: components/CartSummary.tsx:64

  • Override the default CartService.requestPurchaseAuthorization() call. * Note: when this override is used, afterRequestAuthorization receives the original cart.

Parameters

cart

Cart

Returns

void


onRequestQuoteClick?

optional onRequestQuoteClick?: (cart) => void

Defined in: components/CartSummary.tsx:74

Callback fired when "Request a Quote" is clicked. Only shown for contacts when prop is provided.

Parameters

cart

Cart

Returns

void


showCheckoutButton?

optional showCheckoutButton?: boolean

Defined in: components/CartSummary.tsx:46

Display the checkout button. Defaults to true.


showDiscount?

optional showDiscount?: boolean

Defined in: components/CartSummary.tsx:31

Display the total discount of the shopping cart. Defaults to true.


showShippingCosts?

optional showShippingCosts?: boolean

Defined in: components/CartSummary.tsx:34

Display the shipping costs of the shopping cart. Defaults to true.


showSubtotal?

optional showSubtotal?: boolean

Defined in: components/CartSummary.tsx:28

Display the subtotal of the shopping cart. Defaults to true.


showTotalExclVat?

optional showTotalExclVat?: boolean

Defined in: components/CartSummary.tsx:40

Display the total of the shopping cart excluding VAT. Defaults to true.


showTotalVat?

optional showTotalVat?: boolean

Defined in: components/CartSummary.tsx:43

Display the total VAT of the shopping cart. Defaults to true.


showVATs?

optional showVATs?: boolean

Defined in: components/CartSummary.tsx:37

Display all VAT lines of the shopping cart. Defaults to true.


title?

optional title?: string

Defined in: components/CartSummary.tsx:22

Cart summary block title


user?

optional user?: Contact | Customer

Defined in: components/CartSummary.tsx:61

Logged-in user — used to determine purchaser role and authorization limit