When working with the Ecommerce module you might encounter the need to remove multiple products from the CMS at once. By default, the backend grid view allows you to delete one product at a time, which will slow down the process, if you need to remove several products at once.
Another option for you would be to remove the desired products programmatically, but still, this might require extra resources if your developers are not available and you need to remove certain products at the moment. Therefore I will present you a non - programmatic way of adding a delete button in the backend product list view.
In order to achieve the desired result, we will have to add a new CommandWidget in the Toolbar section of the grid, displaying the products in the backend.
By default, the grid view looks like this on our test project:
First we need to navigate to the settings section of the project:
Administration -> Settings -> Advanced -> ContentView -> Controls -> ProductsBackendDefinitionName -> Views -> ProductsBackendMaster -> Toolbar -> Sections -> toolbar -> Items.
Then we need to create a new CommandWidget:
In the new section, we need to fill in several fields:
Command name: groupDelete
Command button type: Standard
CommandText: Delete selected products
After saving the new widget the Ecommerce module will contain a new delete button in the toolbar, which can be used for deleting selected products: