@plentymarkets/shop-api / orderGetters
Variable: orderGetters ​
constorderGetters:object
Defined in: getters/orderGetters.ts:1399
Type Declaration ​
getAccessKey ​
getAccessKey: (
order) =>string
Returns the access key of an order (used for guest order access links).
Parameters ​
order ​
The order object.
Returns ​
string
The access key string, or an empty string if not set.
getAdditionalCostsWithoutTax ​
getAdditionalCostsWithoutTax: (
order) =>OrderItemOrderProperty[]
Returns all order item properties across the order that have no VAT (tax-exempt additional costs).
Parameters ​
order ​
The order object.
Returns ​
An array of OrderItemOrderProperty objects with aggregated surcharges.
getAdditionalCostsWithTax ​
getAdditionalCostsWithTax: (
order) =>OrderItemOrderProperty[]
Returns all order item properties across the order that are marked as additional costs with VAT.
Parameters ​
order ​
The order object.
Returns ​
An array of OrderItemOrderProperty objects with aggregated surcharges.
getBillingAddress ​
getBillingAddress: (
order) =>AddressData|null
Returns the billing address of an order.
Parameters ​
order ​
The order object.
Returns ​
AddressData | null
The AddressData billing address, or null if not set.
getById ​
getById: (
orders,id) =>Order|null
Finds an order by its numeric ID in a list of orders.
Parameters ​
orders ​
Order[]
The array of order objects.
id ​
string
The order ID to search for (as a string).
Returns ​
Order | null
The matching Order object, or null if not found.
getCouponType ​
getCouponType: (
totals) =>string
Returns the coupon type from an order totals object.
Parameters ​
totals ​
The order totals object.
Returns ​
string
The coupon type string, or an empty string if not set.
getCouponValue ​
getCouponValue: (
totals) =>number
Returns the coupon discount value from an order totals object.
Parameters ​
totals ​
The order totals object.
Returns ​
number
The coupon discount amount.
getCurrency ​
getCurrency: (
order) =>string
Returns the currency code used in the order totals.
Parameters ​
order ​
The order object.
Returns ​
string
The ISO 4217 currency code string (e.g. "EUR").
getDate ​
getDate: (
order,locale) =>string
Returns the creation date of an order as a localised date-time string.
Parameters ​
order ​
The order object.
locale? ​
string = 'en'
The BCP 47 locale string used for formatting (defaults to "en").
Returns ​
string
The formatted date-time string, or an empty string if the date is not available.
getDocuments ​
getDocuments: (
order) =>OrderDocument[]
Returns the order documents (e.g. invoices, delivery notes) attached to an order.
Parameters ​
order ​
The order object.
Returns ​
An array of OrderDocument objects, or an empty array if none exist.
getFormattedPrice ​
getFormattedPrice: (
price) =>string
Returns the price as a formatted string.
Parameters ​
price ​
number
The numeric price value.
Returns ​
string
The price as a string, or "0" if falsy.
getId ​
getId: (
order) =>string
Returns the numeric ID of an order as a string.
Parameters ​
order ​
The order object.
Returns ​
string
The order ID string, or an empty string if not set.
getItemName ​
getItemName: (
item) =>string
Returns the display name of an order item.
Parameters ​
item ​
The order item.
Returns ​
string
The order item name string, or an empty string if not set.
getItemNetPrice ​
getItemNetPrice: (
item) =>number
Returns the original net unit price of an order item (from the first amount entry).
Parameters ​
item ​
The order item.
Returns ​
number
The net unit price, or 0 if not set.
getItemNetPriceByCurrency ​
getItemNetPriceByCurrency: (
item,currency) =>number|null
Returns the net unit price of an order item for a specific currency.
Parameters ​
item ​
The order item.
currency ​
string
The ISO 4217 currency code to filter by.
Returns ​
number | null
The net price for the specified currency, or null if not found.
getItemOrderProperties ​
getItemOrderProperties: (
item) =>OrderItemOrderProperty[]
Returns the order properties (additional options/surcharges) for an order item.
Parameters ​
item ​
The order item.
Returns ​
An array of OrderItemOrderProperty objects.
getItemOrderPropertyFileUrl ​
getItemOrderPropertyFileUrl: (
property) =>string
Returns the file URL of a file-type order item property.
Parameters ​
property ​
The order item order property.
Returns ​
string
The file URL string.
getItemOrderPropertyName ​
getItemOrderPropertyName: (
property) =>string
Returns the display name of an order item property.
Parameters ​
property ​
The order item order property.
Returns ​
string
The property name string.
getItemOrderPropertyType ​
getItemOrderPropertyType: (
property) =>string
Returns the type of an order item property (e.g. "text", "selection", "file").
Parameters ​
property ​
The order item order property.
Returns ​
string
The property type string.
getItemOrderPropertyValue ​
getItemOrderPropertyValue: (
property) =>string
Returns the value of an order item property. For "selection" and "multiSelection" types, joins all selected values into a comma-separated string. Falls back to the raw value string if JSON parsing fails.
Parameters ​
property ​
The order item order property.
Returns ​
string
The formatted value string.
getItemPrice ​
getItemPrice: (
item) =>number
Returns the original gross unit price of an order item (from the first amount entry).
Parameters ​
item ​
The order item.
Returns ​
number
The gross unit price, or 0 if not set.
getItemPriceByCurrency ​
getItemPriceByCurrency: (
item,currency) =>number|null
Returns the gross unit price of an order item for a specific currency.
Parameters ​
item ​
The order item.
currency ​
string
The ISO 4217 currency code to filter by.
Returns ​
number | null
The gross price for the specified currency, or null if not found.
getItemQty ​
getItemQty: (
item) =>number
Returns the quantity of an order item.
Parameters ​
item ​
The order item.
Returns ​
number
The item quantity, or 0 if not set.
getItemReturnableQty ​
getItemReturnableQty: (
item) =>number
Returns the quantity of an order item that is eligible for return.
Parameters ​
item ​
The order item.
Returns ​
number
The returnable quantity, or 0 if not set.
getItems ​
getItems: (
order) =>OrderItem[]
Returns the order items with a positive variation ID (i.e. real product items, not surcharges).
Parameters ​
order ​
The order object.
Returns ​
An array of OrderItem objects, or an empty array if none exist.
getItemShortDescription ​
getItemShortDescription: (
order,item) =>string
Returns the short description of the product variation linked to an order item.
Parameters ​
order ​
The order object containing variation data.
item ​
The order item.
Returns ​
string
The short description string, or an empty string if not set.
getItemSku ​
getItemSku: (
item) =>string
Parameters ​
item ​
The order item (currently unused).
Returns ​
string
An empty string.
Deprecated ​
Not yet implemented — always returns an empty string.
getItemVariationId ​
getItemVariationId: (
item) =>number
Returns the variation ID of an order item.
Parameters ​
item ​
The order item.
Returns ​
number
The variation ID, or 0 if not set.
getOpenAmount ​
getOpenAmount: (
totals) =>number|null
Returns the outstanding open amount from an order totals object.
Parameters ​
totals ​
The order totals object.
Returns ​
number | null
The open amount, or null if not set.
getOrderAgainAvailability ​
getOrderAgainAvailability: (
orderItem) =>Availability|null
Returns the current availability information for an order item (for "order again").
Parameters ​
orderItem ​
The order item.
Returns ​
Availability | null
The Availability object, or null if not available.
getOrderAgainAvailabilityAverageDays ​
getOrderAgainAvailabilityAverageDays: (
orderItem) =>number
Returns the average delivery days for the variation of an order item (for "order again").
Parameters ​
orderItem ​
The order item.
Returns ​
number
The average delivery days, or 0 if not set.
getOrderAgainAvailabilityBackgroundColor ​
getOrderAgainAvailabilityBackgroundColor: (
orderItem) =>string
Returns the background color for the availability state of an order item variation (for "order again").
Parameters ​
orderItem ​
The order item.
Returns ​
string
The background color value from AvailabilityBackgroundColor.
getOrderAgainAvailabilityClass ​
getOrderAgainAvailabilityClass: (
orderItem) =>string
Returns a CSS class name derived from the availability ID of an order item variation (for "order again").
Parameters ​
orderItem ​
The order item.
Returns ​
string
The CSS class name string (e.g. "availability-2").
getOrderAgainAvailabilityName ​
getOrderAgainAvailabilityName: (
orderItem) =>string
Returns the availability name for the variation of an order item (for "order again").
Parameters ​
orderItem ​
The order item.
Returns ​
string
The availability name string, or an empty string if not set.
getOrderAgainAvailabilityTextColor ​
getOrderAgainAvailabilityTextColor: (
orderItem) =>string
Returns the text color for the availability state of an order item variation (for "order again").
Parameters ​
orderItem ​
The order item.
Returns ​
string
The text color value from AvailabilityTextColor.
getOrderAgainInformationPrice ​
getOrderAgainInformationPrice: (
orderItem) =>number
Returns the recalculated unit price for ordering the item again ("order again" feature). Uses the applicable graduated price, falling back to default, then RRP, then zero. Adds any included order property surcharges.
Parameters ​
orderItem ​
The order item.
Returns ​
number
The recalculated unit price as a number.
getOrderAgainOrderItemStock ​
getOrderAgainOrderItemStock: (
orderItem) =>number
Returns the current stock level for an order item's variation (for "order again").
Parameters ​
orderItem ​
The order item.
Returns ​
number
The stock quantity, or 0 if not set.
getOrderAgainOrderPropertiesPrice ​
getOrderAgainOrderPropertiesPrice: (
orderItem) =>number
Returns the total surcharge from order properties that are included in the order-again price. Only includes properties with surchargeType === "incl" that are not shown as additional costs.
Parameters ​
orderItem ​
The order item.
Returns ​
number
The total order property surcharge as a number.
getOrderAgainOrderProperty ​
getOrderAgainOrderProperty: (
orderItem,property) =>ProductProperty|null
Finds the current product property definition that corresponds to an existing order item property.
Parameters ​
orderItem ​
The order item to look up properties for.
property ​
The existing order item order property to match against.
Returns ​
ProductProperty | null
The matching ProductProperty, or null if not found.
getOrderAgainOrderPropertySurcharge ​
getOrderAgainOrderPropertySurcharge: (
orderItem,property) =>number
Returns the surcharge for an order property in the context of "order again".
Parameters ​
orderItem ​
The order item.
property ​
The existing order item order property.
Returns ​
number
The surcharge amount, or 0 if the property is not found.
getOrderAgainPropertyValue ​
getOrderAgainPropertyValue: (
property) =>string
Returns the value of an order item property formatted for the "order again" basket parameter. For "selection" types, extracts the first selected key. For "empty" types, returns "true". Falls back to the raw value string if JSON parsing fails.
Parameters ​
property ​
The order item order property.
Returns ​
string
The formatted property value string.
getOrderAgainSortedChangedItems ​
getOrderAgainSortedChangedItems: (
order) =>OrderItem[]
Returns the order items sorted so that changed items (price difference or no longer salable) appear first.
Parameters ​
order ​
The order object.
Returns ​
The sorted array of OrderItem objects.
getOrderAttributes ​
getOrderAttributes: (
order) =>OrderItemAttribute[]
Returns the attribute entries of an order item.
Parameters ​
order ​
The order item (despite the parameter name).
Returns ​
An array of OrderItemAttribute objects, or an empty array if not set.
getOrderContactWish ​
getOrderContactWish: (
order) =>string|null
Returns the customer contact wish (special delivery instruction) from an order.
Parameters ​
order ​
The order object.
Returns ​
string | null
The contact wish string, or null if not set.
getOrderCustomerSign ​
getOrderCustomerSign: (
order) =>string|null
Returns the customer sign (reference/note) from an order.
Parameters ​
order ​
The order object.
Returns ​
string | null
The customer sign string, or null if not set.
getOrderEmail ​
getOrderEmail: (
order) =>string
Returns the email address from the order's delivery address options (option type ID 5).
Parameters ​
order ​
The order object.
Returns ​
string
The email address string, or an empty string if not found.
getOrderItemAttributeName ​
getOrderItemAttributeName: (
attribute) =>string|null
Returns the name of an order item attribute.
Parameters ​
attribute ​
The order item attribute.
Returns ​
string | null
The attribute name string, or null if not set.
getOrderItemAttributeValue ​
getOrderItemAttributeValue: (
attribute) =>string|null
Returns the value of an order item attribute.
Parameters ​
attribute ​
The order item attribute.
Returns ​
string | null
The attribute value string, or null if not set.
getOrderItemLink ​
getOrderItemLink: (
order,productId) =>string
Returns the URL path to the product page for an order item.
Parameters ​
order ​
The order object containing variation data.
productId ​
number
The numeric ID of the product.
Returns ​
string
The product URL path string.
getOrderItemOrderPropertyName ​
getOrderItemOrderPropertyName: (
item) =>string
Returns the display name of an order item property.
Parameters ​
item ​
The order item order property.
Returns ​
string
The property name string.
getOrderItemOrderPropertyNetSurcharge ​
getOrderItemOrderPropertyNetSurcharge: (
item) =>number
Returns the net surcharge amount of an order item property.
Parameters ​
item ​
The order item order property.
Returns ​
number
The net surcharge amount as a number.
getOrderItemOrderPropertySurcharge ​
getOrderItemOrderPropertySurcharge: (
item) =>number
Returns the gross surcharge amount of an order item property.
Parameters ​
item ​
The order item order property.
Returns ​
number
The surcharge amount as a number.
getOrderPaymentBankDetails ​
getOrderPaymentBankDetails: (
order) =>OrderPaymentBankDetails|null
Returns the bank transfer payment details for an order.
Parameters ​
order ​
The order object.
Returns ​
OrderPaymentBankDetails | null
The OrderPaymentBankDetails object, or null if not set.
getOrderPaymentBankDetailsAccountNumber ​
getOrderPaymentBankDetailsAccountNumber: (
bankDetails) =>string
Returns the bank account number from payment bank details.
Parameters ​
bankDetails ​
The order payment bank details object.
Returns ​
string
The account number string, or an empty string if not set.
getOrderPaymentBankDetailsBankCode ​
getOrderPaymentBankDetailsBankCode: (
bankDetails) =>string
Returns the bank sort code from payment bank details.
Parameters ​
bankDetails ​
The order payment bank details object.
Returns ​
string
The bank code string, or an empty string if not set.
getOrderPaymentBankDetailsBankName ​
getOrderPaymentBankDetailsBankName: (
bankDetails) =>string
Returns the bank name from payment bank details.
Parameters ​
bankDetails ​
The order payment bank details object.
Returns ​
string
The bank name string, or an empty string if not set.
getOrderPaymentBankDetailsHolder ​
getOrderPaymentBankDetailsHolder: (
bankDetails) =>string
Returns the account holder name from payment bank details.
Parameters ​
bankDetails ​
The order payment bank details object.
Returns ​
string
The account owner name string, or an empty string if not set.
getOrderPaymentBankDetailsIban ​
getOrderPaymentBankDetailsIban: (
bankDetails) =>string
Returns the IBAN from payment bank details.
Parameters ​
bankDetails ​
The order payment bank details object.
Returns ​
string
The IBAN string, or an empty string if not set.
getOrderPaymentBankDetailsSwift ​
getOrderPaymentBankDetailsSwift: (
bankDetails) =>string
Returns the BIC/SWIFT code from payment bank details.
Parameters ​
bankDetails ​
The order payment bank details object.
Returns ​
string
The SWIFT code string, or an empty string if not set.
getOrderReferenceOriginId ​
getOrderReferenceOriginId: (
order) =>string|undefined
Returns the origin order ID from the first order reference (e.g. the original order for a return).
Parameters ​
order ​
The order object.
Returns ​
string | undefined
The origin order ID string, or undefined if not set.
getOrdersTotal ​
getOrdersTotal: (
orders) =>number
Returns the total count of orders from a paginated orders response.
Parameters ​
orders ​
The paginated orders response object.
Returns ​
number
The total order count, or 0 if not set.
getOrderTrackingNumbers ​
getOrderTrackingNumbers: (
order) =>string[]
Returns all parcel tracking numbers for an order.
Parameters ​
order ​
The order object.
Returns ​
string[]
An array of tracking number strings, or an empty array if none exist.
getOrderTrackingUrl ​
getOrderTrackingUrl: (
order) =>string
Returns the first parcel tracking URL for an order.
Parameters ​
order ​
The order object.
Returns ​
string
The tracking URL string, or an empty string if not set.
getOrderVariationFirstImage ​
getOrderVariationFirstImage: (
order,item) =>ImagesData
Returns the first image data object for the variation of an order item.
Parameters ​
order ​
The order object containing variation data.
item ​
The order item.
Returns ​
The first ImagesData object for the variation, or null if not available.
getOrderVariationImage ​
getOrderVariationImage: (
order,item) =>string
Returns the cover image URL for the variation of an order item.
Parameters ​
order ​
The order object containing item image data.
item ​
The order item.
Returns ​
string
The image URL string, or null if not available.
getOrderVariationPath ​
getOrderVariationPath: (
order,item) =>string
Returns the URL path to the product page for an order item.
Parameters ​
order ​
The order object containing item URL data.
item ​
The order item.
Returns ​
string
The product URL path string, or null if not available.
getOrderVatRate ​
getOrderVatRate: (
vat) =>number
Returns the VAT rate of an order totals VAT entry.
Parameters ​
vat ​
The order totals VAT entry.
Returns ​
number
The VAT rate.
getOrderVats ​
getOrderVats: (
order) =>OrderTotalsVat[]
Returns the VAT entries from the order totals.
Parameters ​
order ​
The order object.
Returns ​
An array of OrderTotalsVat objects.
getOrderVatValue ​
getOrderVatValue: (
vat) =>number
Returns the VAT amount (monetary value) of an order totals VAT entry.
Parameters ​
vat ​
The order totals VAT entry.
Returns ​
number
The VAT amount.
getOriginalItemNetPrice ​
getOriginalItemNetPrice: (
item) =>number
Returns the original net unit price of an order item, preferring a non-system currency amount.
Parameters ​
item ​
The order item.
Returns ​
number
The original net price (in the non-system currency if available), or 0 if not set.
getOriginalItemPrice ​
getOriginalItemPrice: (
item) =>number
Returns the original gross unit price of an order item, preferring a non-system currency amount.
Parameters ​
item ​
The order item.
Returns ​
number
The original gross price (in the non-system currency if available), or 0 if not set.
getOriginalOrderVats ​
getOriginalOrderVats: (
order) =>OrderTotalsVat[]
Returns the VAT entries from the original (non-system) currency of the order. Falls back to the system currency VAT entries if no non-system currency amounts exist.
Parameters ​
order ​
The order object.
Returns ​
An array of OrderTotalsVat objects with rate and value properties.
getOriginalShippingCost ​
getOriginalShippingCost: (
order) =>number
Returns the original gross shipping cost, preferring a non-system-currency amount entry. Falls back to the system currency shipping cost if no alternative is found.
Parameters ​
order ​
The order object.
Returns ​
number
The gross shipping cost, or 0 if not set.
getOriginalShippingCostNet ​
getOriginalShippingCostNet: (
order) =>number
Returns the original net shipping cost, preferring a non-system-currency amount entry. Falls back to the system currency shipping cost if no alternative is found.
Parameters ​
order ​
The order object.
Returns ​
number
The net shipping cost, or 0 if not set.
getPagination ​
getPagination: (
orders) =>AgnosticPagination
Returns the pagination data for an orders response.
Parameters ​
orders ​
The paginated orders response object.
Returns ​
AgnosticPagination
An AgnosticPagination object with current page, total pages, total items, items per page, and page options.
getPaidAmount ​
getPaidAmount: (
totals) =>number
Returns the total paid amount from an order totals object.
Parameters ​
totals ​
The order totals object.
Returns ​
number
The paid amount, or 0 if not set.
getPaymentMethodName ​
getPaymentMethodName: (
order) =>string
Returns the display name of the payment method used for an order.
Parameters ​
order ​
The order object.
Returns ​
string
The payment method name string, or an empty string if not set.
getPaymentStatus ​
getPaymentStatus: (
order) =>string
Returns the payment status of an order (e.g. "paid", "unpaid", "partial").
Parameters ​
order ​
The order object.
Returns ​
string
The payment status string, or an empty string if not set.
getPaymentStatusKey ​
getPaymentStatusKey: (
order) =>string
Returns the payment status key of an order (machine-readable identifier).
Parameters ​
order ​
The order object.
Returns ​
string
The payment status key string, or an empty string if not set.
getPreferredDeliveryServices ​
getPreferredDeliveryServices: (
order) => {[key:string]:string; } |null
Returns the preferred delivery services (e.g. DHL Preferred Neighbour) from an order. Normalises both array and object formats into a single key-value record.
Parameters ​
order ​
The order object.
Returns ​
{[key: string]: string; } | null
A record of preferred delivery service options, or null if none are set.
getPrice ​
getPrice: (
order) =>number
Returns the gross total price of an order.
Parameters ​
order ​
The order object.
Returns ​
number
The gross total as a number, or 0 if not set.
getShippingAddress ​
getShippingAddress: (
order) =>AddressData|null
Returns the shipping/delivery address of an order.
Parameters ​
order ​
The order object.
Returns ​
AddressData | null
The AddressData delivery address, or null if not set.
getShippingAmount ​
getShippingAmount: (
totals) =>number
Returns the gross shipping amount from an order totals object.
Parameters ​
totals ​
The order totals object.
Returns ​
number
The gross shipping cost.
getShippingAmountNet ​
getShippingAmountNet: (
totals) =>number
Returns the net shipping amount from an order totals object.
Parameters ​
totals ​
The order totals object.
Returns ​
number
The net shipping cost.
getShippingCost ​
getShippingCost: (
order) =>number
Returns the gross shipping cost of an order (from the first amount entry).
Parameters ​
order ​
The order object.
Returns ​
number
The gross shipping cost, or 0 if not set.
getShippingCostNet ​
getShippingCostNet: (
order) =>number
Returns the net shipping cost of an order (from the first amount entry).
Parameters ​
order ​
The order object.
Returns ​
number
The net shipping cost, or 0 if not set.
getShippingDate ​
getShippingDate: (
order,locale) =>string|null
Returns the shipping date of an order (date type ID 5) as a localised date string.
Parameters ​
order ​
The order object.
locale? ​
string = ''
The BCP 47 locale string used for formatting (defaults to "").
Returns ​
string | null
The formatted date string, or null if the shipping date is not available.
getShippingProfileName ​
getShippingProfileName: (
order) =>string
Returns the shipping profile name of an order.
Parameters ​
order ​
The order object.
Returns ​
string
The shipping profile name string, or an empty string if not set.
getShippingProvider ​
getShippingProvider: (
order) =>string
Returns the shipping provider name of an order.
Parameters ​
order ​
The order object.
Returns ​
string
The shipping provider name string, or an empty string if not set.
getStatus ​
getStatus: (
order) =>string
Returns the human-readable status name of an order.
Parameters ​
order ​
The order object.
Returns ​
string
The status name string, or an empty string if not set.
getSubTotal ​
getSubTotal: (
totals) =>number
Returns the gross subtotal (item sum) from an order totals object.
Parameters ​
totals ​
The order totals object.
Returns ​
number
The gross item sum.
getSubTotalNet ​
getSubTotalNet: (
totals) =>number
Returns the net subtotal (item sum) from an order totals object.
Parameters ​
totals ​
The order totals object.
Returns ​
number
The net item sum.
getTotal ​
getTotal: (
totals) =>number
Returns the gross total from an order totals object.
Parameters ​
totals ​
The order totals object.
Returns ​
number
The gross total amount.
getTotalNet ​
getTotalNet: (
totals) =>number
Returns the net total from an order totals object.
Parameters ​
totals ​
The order totals object.
Returns ​
number
The net total amount.
getTotals ​
getTotals: (
order) =>OrderTotals
Returns the totals summary for an order.
Parameters ​
order ​
The order object.
Returns ​
The OrderTotals object.
getVatAmount ​
getVatAmount: (
totals) =>number
Returns the VAT amount (monetary value) from the first VAT entry of an order totals object.
Parameters ​
totals ​
The order totals object.
Returns ​
number
The VAT amount.
getVatRate ​
getVatRate: (
totals) =>number
Returns the VAT rate (percentage) from the first VAT entry of an order totals object.
Parameters ​
totals ​
The order totals object.
Returns ​
number
The VAT rate.
hasAllOrderPropertiesAvailable ​
hasAllOrderPropertiesAvailable: (
orderItem) =>boolean
Returns whether all order properties of an order item are still available and compatible with their current definitions (used to validate "order again" feasibility).
Parameters ​
orderItem ​
The order item.
Returns ​
boolean
true if all properties are valid and available, otherwise false.
hasOrderAgainChangedItems ​
hasOrderAgainChangedItems: (
order) =>boolean
Returns whether the order has any items that have changed since the original order (i.e. items that are no longer salable or whose price has changed).
Parameters ​
order ​
The order object.
Returns ​
boolean
true if any item has changed, otherwise false.
hasReturnableItems ​
hasReturnableItems: (
order) =>boolean
Returns whether the order has any items with a returnable quantity greater than zero.
Parameters ​
order ​
The order object.
Returns ​
boolean
true if at least one item has returnable quantity, otherwise false.
isBundleComponents ​
isBundleComponents: (
orderItem) =>boolean
Returns whether an order item is a bundle component (type ID 2).
Parameters ​
orderItem ​
The order item.
Returns ​
boolean
true if the item is a bundle component, otherwise false.
isBundleItem ​
isBundleItem: (
orderItem) =>boolean
Returns whether an order item is a bundle item (type ID 3).
Parameters ​
orderItem ​
The order item.
Returns ​
boolean
true if the item is a bundle, otherwise false.
isCouponItem ​
isCouponItem: (
orderItem) =>boolean
Returns whether an order item is a coupon (type ID 4).
Parameters ​
orderItem ​
The order item.
Returns ​
boolean
true if the item is a coupon, otherwise false.
isItemOrderPropertyFile ​
isItemOrderPropertyFile: (
property) =>boolean
Returns whether an order item property is of type "file".
Parameters ​
property ​
The order item order property.
Returns ​
boolean
true if the type is "file", otherwise false.
isItemSalableAndActive ​
isItemSalableAndActive: (
order,orderItem) =>boolean
Returns whether the variation of an order item is both salable and active.
Parameters ​
order ​
The order object containing variation data.
orderItem ​
The order item.
Returns ​
boolean
true if the variation is salable and active, otherwise false.
isReturn ​
isReturn: (
order) =>boolean
Returns whether the order is a return (type ID 3).
Parameters ​
order ​
The order object.
Returns ​
boolean
true if the order type is return, otherwise false.
isReturnable ​
isReturnable: (
order) =>boolean
Returns whether the order is eligible for a return.
Parameters ​
order ​
The order object.
Returns ​
boolean
true if the order can be returned, otherwise false.
showItemOrderPropertyValue ​
showItemOrderPropertyValue: (
property) =>boolean
Returns whether an order item property value should be displayed in the UI. A value is shown when it is non-empty and the property type is not "empty".
Parameters ​
property ​
The order item order property.
Returns ​
boolean
true if the value should be shown, otherwise false.