- 29 Sep 2023
- 1 Minuut om te lezen
- Afdrukken
- DonkerLicht
- Pdf
Local storage for selecting products
- Bijgewerkt op 29 Sep 2023
- 1 Minuut om te lezen
- Afdrukken
- DonkerLicht
- Pdf
Intro
Bulk editor har support for pre-selecting products using local storage key bulkeditor.selected_ids and value of comma separated pIDs.
The feature lets you pre-select products in parts of the control panel and then being able to go to BulkEditor Actions with those products pre-selected.
The action page will look for bulkeditor.selected_ids in Local Storage, pick it up if it’s there and then remove the item from Local Storage.
Usecase
So what are the usecase?
Say you have a list of products that need a change. You could use bulk, filter and search but there will always be a change to get more, or less, products than you aimed for.
If you have the products IDs of these products you can manually add a key/value via the inspector in local storage which will select those products then entering /5/#/bulk/products/actions
How to
- Go to a random page in the control panel
- Open the inspector in Chrome and go to
- Application
- Storage > Local Storage
- Find the storage for the site you're on
- Add a new key: bulkeditor.selected_ids
- Add a string of IDs, like this: [10, 12, 14, 16]
- Using the address bar in your browser go directly to /5/#/bulk/products/actions, skipping the default bulk editor landing page
You should now have the products pre-selected and can make necessary changes.