Very quickly when testing with Magento you can end up with lots and lots attributes in Magento that you don’t need any more.
Deleting an attribute is easy, deleting lots is a pain and it can be so easily be scripted, because we all hate doing something more than once right?
So that’s what the video below shows you and the code snippet is just below the video for you.
Quickly & easily bulk delete attributes in Magento
The iMacro Code
To make this work for you, you’ll need the macro code below:
VERSION BUILD=7500718 RECORDER=FX TAB T=1 TAG POS=1 TYPE=TD ATTR=TXT:No ONDIALOG POS=1 BUTTON=OK CONTENT= TAG POS=1 TYPE=BUTTON ATTR=CLASS:scalable<SP>delete
How to add this to your iMacro list
To add this to your iMacros follow these steps:
- In your iMacros side bar, click on the #Current.iim macro
- At the bottom panel press the “Edit” tab
- Press “Edit Macro”
- Paste the code in from above
- Press File > Save As and save it as “bulk delete attributes.iim”
- For this new macro to show in the list, on the same edit tab in the left panel, press “Refresh macro list”
- Use as you desire
Use your common sense when deleting attributes or using any form of automated script.
Make sure you know what it’s doing, have faith in you have a restricted search made and watch it, just in case you delete system attributes (while sipping tea and with the feet on the desk).