Magento – Remove redundant attributes
Some time Magento redundant attributes can be very harmful. for example, AheadWork shop by brand will add aw_shopbybrand_brand attribute to catalog_product, itโs ok when you still use AheadWork module but it can be a big trouble like fatal error on server or producing error messages in your log file when you replace it with another extension. This issue happened because you just removed AheadWork module code from your Magento installation, aw_shopbybrand_brand attribute is still stay in your database. in this article, i will show you a setup script that will remove it.
you will need to create a custom module with ability to run setup script. there are tons of guide for this matter online. but if you are lazier like i am, you can use a free tool online that help to create custom module on the fly, please visit this url
when you have your setup script file ready, add these line to your setup script
<?php $installer = $this; $installer->startSetup(); // remove the redundant attribute $installer->removeAttribute('catalog_product','aw_shopbybrand_brand'); $installer->endSetup();
then clear cache & refresh your page. Congratulation! that ugly attribute has gone ! ๐