1

I created a custom category attribute from the following source:http://ashsmith.co/2013/03/quick-tip-adding-custom-category-attributes-to-magento/

Added new attribute successfully, however, when I changed the name of the field and changed from textarea to dropdown menu, my changes weren't being reflected on backend. I cleared cache, re-indexed site, and still nothing. Am I missing something?

2
  • This tutorial uses installer. Once installed if you want to create an other attribute either uninstall the module or create a new version of it with the appropriate change of the setup/ .php Commented Mar 31, 2014 at 22:27
  • How do you uninstall? Thanks for the help!
    – frshjb373
    Commented Mar 31, 2014 at 22:36

1 Answer 1

2

The tutorial you have linked uses an installer in the module you create. Once installed, any changes you make to mysql4-install-0.0.1.php will have no effect unless you either uninstall and reinstall the module or create a newer version of your module let's say 0.0.2

Be very careful and always backup

Do not do this on a production server

1.Uninstalling

There is no easy way to uninstall a custom module you have to "mess around" with your DB

BACKUP BACKUP BACKUP

This is not a wiki on uninstalling modules in general

Notice that this will not delete the already created attribute

  1. Make the changes that you want in

    app/code/local/Meteorify/Customcatattrb/sql/customcatattrb_setup/mysql4-install-0.0.1.php

  2. Open your DB, find the table core_resource

  3. Find the entry 'customcatattrb' '0.0.1' '0.0.1' and Delete it

  4. Login to your backend and clear the cache

2. New Version of your module

Notice that nor this will delete the already created attribute

  1. Duplicate

    app/code/local/Meteorify/Customcatattrb/sql/customcatattrb_setup/mysql4-install-0.0.1.php

    in

    app/code/local/Meteorify/Customcatattrb/sql/customcatattrb_setup/mysql4-upgrade-0.0.1-0.0.2.php

  2. Make the changes that you want in the created file
  3. Open app/code/local/Meteorify/Customcatattrb/etc/config.xml and in line 5 replace <version>0.0.1</version>with <version>0.0.2</version>

  4. Login to your backend and clear the cache

2
  • Thanks, but how do you uninstall old field?
    – frshjb373
    Commented Apr 4, 2014 at 20:59
  • This is not the scope of this question. Make a new one please. Did you manage to fix your problem? Commented Apr 5, 2014 at 6:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.