Added Card and Barcode Processing on the Order Edit Screen

Tags:

Starting from V7Preview4, the plugin can handle card sliding or barcode scanning events on the order edit screen. This can be used, for example, for integration with an external loyalty system.

Two notifications have been added to PluginContext.Notifications:

These notifications are triggered only on the order edit screen (without open pop-ups) and only when a card is slid or a barcode is scanned that has not been recognized by the built-in handlers. Applying a discount using a registered discount card in SyrveRms, adding a product to the order by packaging barcode, and other similar operations work as before, but if the slid card or scanned barcode is unknown to the SyrveFront application, it is the plugin’s turn. The registered plugin handler will receive the barcode or card data and must report the result — whether to consider the notification processed. If the plugin indicates that the event is processed, the process ends there, and handlers of other plugins will not be called. If the plugin does not know what the barcode or card is, it should return false so that handlers of other plugins are called. If the event ultimately remains unprocessed, the user will receive a standard message stating that the slid card or scanned barcode is unknown to the system.

During the notification processing, a progress bar is displayed on the screen. In addition to the barcode or card data, the plugin will receive the current order, a local version of IOperationService for editing the current order, and IViewManager with the ability to show dialog windows and change text on the progress bar.

Examples of usage have been added to SamplePlugin: OrderEditScreen.AddProductByBarcode and OrderEditScreen.AddDiscountByCard.