Skip to main content

Email Utils

Applies the configured AssetStorageStrategy.toAbsoluteUrl() function to each of the OrderLine's featuredAsset.preview properties, so that they can be correctly displayed in the email template. This is required since that step usually happens at the API in middleware, which is not applicable in this context. So we need to do it manually.

Note: Mutates the Order object

Signature
function transformOrderLineAssetUrls(ctx: RequestContext, order: Order, injector: Injector): Order

Parameters

ctx

order

parameterOrder

injector

parameterInjector

Ensures that the ShippingLines have a shippingMethod so that we can use the shippingMethod.name property in the email template.

Signature
function shippingLinesWithMethod(order: Order): ShippingLine[]

Parameters

order

parameterOrder
Was this chapter helpful?
Report Issue
Edited Feb 2, 2026·Edit this page