Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I want to create a custom action in the Ecommerce back-end order overview to let the customer select a few orders and forward the selected orders to an external system.
So far I managed to create the Action menu on the order details page and call a item.AdditionalData.Add("jsAction", ....) to call a API controller to handle the order.
This works ok, however only one order at a time. Now I am trying to add this functionality in the Order overview page. I managed to create the menu item there (see screenshot), but am struggling to understand what the next steps are.
I tried adding a controller to the package.manifest. However cannot find out how to call this controller, I think maybe using an "actionView".
But how do I get the order id's of the selected orders in that controller?
I am struggling a bit with the setup of this. A little help to point me in the right direction would be nice. :-)
The actions are considered "bulk actions" and yes they can be extended. We haven't got round to documenting them fully yet, but you can find some details in an issue where this feature was asked for, specifically here https://github.com/vendrhub/vendr/issues/218#issuecomment-730404537
This shows you how to register a bulk action, with a doAction method that gets called for each item one-by-one. In this method, you can call your own API controller to perform whatever task you require.
Currently, as per how Umbraco bulk actions work, this curently performs the doAction method one at a time against each selected item. The reason Umbraco does it this way is to be able to report on progress. There is an issue already to extend this to support a configuration stage and allow the task to execute across all the selected items as a whole, but this isn't scheduled for development yet https://github.com/vendrhub/vendr/issues/231
Give the initial setup a try and see if that will work for you and if not I can outline a workaround for the open issue.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted