Fluent Commerce Logo
Docs

Enable sorting for the Print Button

How-to Guide

Author:

Yulia Andreyanova

Changed on:

29 May 2026

Key Points

  • Configure sorting for any Print Button using the sort property and a matching setting
  • Use arrayPath to define which array should be sorted
  • Use one or more sorting rules to define sorting priority
  • If sorting is not configured, the Print Button behavior remains unchanged
No alt text provided

Steps

Step arrow right iconPrerequisites

Before configuring sorting:
  • Ensure the Print Button component is configured in the manifest.
  • Ensure the printable document template is already configured using the `setting` property.
  • Create a setting that contains the sorting configuration.

Step arrow right iconConfigure the Print Button

Add the `sort` property to the Print Button configuration.The value of the `sort` property must match the name of the setting that contains the sorting configuration.

Step arrow right iconConfigure the sorting setting

Create a setting with the same name as the value specified in the Print Button `sort` property.

Configuration properties

PropertyTypeRequiredDefaultDescription
`arrayPath``string`nononePath to the array that should be sorted.
`sort``array`yesnoneList of sorting rules. Rules are applied in the order they are defined.
`field``string`yesnonePath to the value used for sorting, relative to each item in the sorted array.
`order``string`no`ASC`Sort order. Supported values: `ASC``DESC`.
`type``string`no`string`Defines how values are compared during sorting. Supported values: `string``number``boolean`.

Step arrow right iconMulti-field sorting


The following example applies sorting by `node.groupId` in descending order first, then by `node.classId`, and finally by `node.qty` as a number.Sorting rules are applied in the order they appear in the `sort` array.The following example applies sorting by `groupId` in descending order first, then by `classId`, and finally by `qty` as a number.