Python scripts designed to clean up Demandware slots, campaigns, etc
Runs through the provided XML files and outputs a cleaned up XML. Good for starting a fresh set of slots.
Runs through the provided XML files and outputs a delete.xml file. This is used to mass delete hidden slots.
Scripts both run on files named pier1_slot_list.xml and pier1_catalog.xml that need to be contained in the root folder. You will need to manually remove and add xmlns="http://www.demandware.com/xml/impex/slot/2008-09-08" from/to the root element of the slot list XML file.
This is a bug and will hopefully be fixed soon, but XML namespaces are not the most friendly thing in the world.
- Ensure you have required XML files in your local root folder
- XML files are exported from Demandware under Online Marketing > Imports & Export and Products and Catalogs > Import & Export
- Manually remove xmlns value from both files
- Open Terminal
- Navigate to Pier-1-DW-Cleaner folder
- python dw_slot_delete.py
- Script will run and generate several .txt files and xml files.
- Upload pier1-slot-list-delete.xml (or pier1-slot-list-clean.xml) to Online Marketing > Imports & Export
- Navigate to Content Slots import page.
- Choose your file from the list
- XML Validation happens
- Choose delete
- Fix XML namespace bug
- Add user interaction