commerce
commerce copied to clipboard
Improve “Download PDF…” UX
Discussed in https://github.com/craftcms/commerce/discussions/2480
Originally posted by mattstein July 10, 2021 The order listing’s Download PDF... button should be improved to match the more optimal UX of the order detail page.
Order Detail 👍
The order detail page is ideal with its PDF download option:
- If no PDF template/format is configured, no button is shown.
- If one PDF template/format is configured, a simple Download PDF is shown.
- If multiple PDF templates/formats are configured, the button’s primary action is to download whichever is configured as the default, with a dropdown menu for otherwise selecting the preferred format.
The user is only presented options that make sense given the configuration.
Order Listing 😐
The order listing page is less optimal.

It does only display its Download PDF… button if there‘s at least one PDF template/format configured, but...
- It always requires opening the download menu and pressing Download.
- It always prompts you to select the PDF template/format even if there’s only one choice.
- It prompts for download types that only make sense when multiple orders were selected, which adds unnecessary steps:
- If only one order was selected and only one PDF template/format is configured, we have to click to open this menu, ignore an irrelevant option, and choose a download type.
- If only one order was selected, we might download a ZIP file containing only one document which just adds a required step to extract it.
tl;dr
I’d therefore suggest the following changes for the order listing’s Download PDF button:
- If only one order is selected from the list and only one PDF template/format is configured, omit the
…from Download PDF…, skip the menu, and download the PDF document. - If multiple orders are selected from the list and only one PDF template/format is configured, omit the menu’s PDF selection.
This would create a more optimal download flow that’s consistent with the beauty of the order detail page’s PDF downloading experience.