The result action decides what the editor does after the customer confirms the final verification and the print job has been saved. Design something, click Continue, approve the printing and click Final Confirm:
'None' - the editor stays open; the customer closes it with ×.'Close' - the editor closes with the reason 'Confirmed' (and navigates to redirectUrl, if set).'Dialog' - a small dialog with your title, message and button; the button closes the editor.The values are case-sensitive - 'CLOSE' or 'none' are treated as 'None'.
The close reason passed to onClose is logged below.
window.tronDesigner.openDesigner({
openMode: 'Create',
dataMode: 'Exact',
printJob: {
addProducts: { supplierCode: 'PFC', variants: [{ productCode: '10086021' }] },
addPrintings: [{ printPositionCode: 'front', printTechnologyCode: 'PAD03' }]
},
editor: {
result: {
resultAction: 'Dialog', // 'None' | 'Close' | 'Dialog' (case-sensitive)
redirectUrl: '/cart', // optional, for 'Close' and 'Dialog'
closeDialog: [
{ language: 'en', title: 'Print Graphics ready', message: 'Your design has been saved.', buttonText: 'Continue to cart' }
]
}
}
}, {
mode: 'dialog',
onClose: (reason, redirectUrl) => console.log('Editor closed:', reason, redirectUrl)
});
window.tronDesigner
.setExactProduct('PFC', undefined, (b) => b.addVariant('10086021'))
.addExactPrinting('front', 'PAD03')
.setResultActionCloseEditor() // or setResultActionNone() / setResultActionShowDialog(dialogs, redirectUrl)
.open({ mode: 'dialog' });
<button data-td-action="OpenCreate"
data-td-supplier-code="PFC"
data-td-product-code="10086021"
data-td-print-position-code="front"
data-td-print-technology-code="PAD03"
data-td-result-action="Close"
data-td-result-redirect-url="/cart">
Design your print
</button>