Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6709283
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:51:44+00:00 2026-05-26T07:51:44+00:00

is it possible to change type of a attribute after it has been created.

  • 0

is it possible to change type of a attribute after it has been created.
I want to change type of certain attribute to Multi select list. Type of these attribute is currently ‘Dropdown’.
Actually When I create the attributes, there was no need of multi select when I created it originally, but, now client wants to change it to “Multi select”.

Please help me out, I can not create new attributes by deleting the old ones, as, there is some data, and certain part of design is hard coded and depends on certain values of attribute.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T07:51:45+00:00Added an answer on May 26, 2026 at 7:51 am

    Yes it’s possible programmatically thanks to the method Mage_Eav_Model_Entity_Setup::updateAttribute($entityTypeId, $id, $field, $value=null, $sortOrder=null)

    It’s not possible with the Attribute Management in Magento Backend because it has consequence with the existing data. In your case, changing from select to multiselect should be ok but do a database backup and test if your product are still correctly displayed.

    Programmatically, the best way is to do it from an update setup script. I don’t know your module but here are some information to do it.

    An update setup script is launched when you provide a new number version to your module and you provide a setup script with the old and new version number as a filename.

    1) Here is the header of a config.xml module, change it to provide a higher version. For example, the new version is

    <?xml version="1.0" encoding="UTF-8"?>
    <config>
    <modules>
        <Mycompany_Mymodule>
            <version>1.0.1</version><!-- the old one was 1.0.0 -->
        </Mycompany_Mymodule>
    </modules>
    ...
    </config>
    

    2) you need to have in the config.xml file, between the tags <global>...</global> the following code, please adapt to your situation:

      <resources>
            <mymodule_setup><!-- name that you will give to the folder into the sql folder  -->
                <setup>
                    <module>Mycompany_Mymodule</module>
                    <class>Mage_Eav_Model_Entity_Setup</class><!-- You can have a setup class which extends this class -->
                </setup>
                <connection>
                    <use>default_setup</use>
                </connection>
            </mymodule_setup>
        </resources>
    

    3) Then you need to create a setup script in your module folder with the old and new version number app/code/local/mycompany/mymodule/sql/mymodule_setup/mysql4-upgrade-1.0.0-1.0.1.php
    (mysql4-upgrade-old.version.number-new.version.number.php)

    4) And in this new script set a code like this, please adapt to your situation:

    <?php
    $installer = $this;
    /*@var $installer Mage_Eav_Model_Entity_Setup */
    
    $entityTypeId = $installer->getEntityTypeId('catalog_product');
    
    $idAttributeOldSelect = $this->getAttribute($entityTypeId, 'myold_attribute', 'attribute_id');
    $installer->updateAttribute($entityTypeId, $idAttributeOldSelect, array(
        'frontend_input'    => 'multiselect'
    ));
    

    5) Refresh your Magento page and eventually flush your cache

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to change the type of a TFS work item? For example,
Is it possible to change a column type in a SQL Server 2008 database
I am wondering if its possible to change a HTML elements data type with
In C#, is it possible to decorate an Enum type with an attribute or
Possible Duplicate: jQuery change input type How to replace input[type=submit] to input[type=text] using jQuery?
Possible Duplicate: Change icon on of an App in iOS 4 in run-time Is
Possible Duplicate: change layout and template in zend dynamically according to the device(android tab,iphone,ipad)
Is it possible to change the size of a font in .net winforms without
Is it possible to change the assembly name based on the project configuration? I
Is it possible to change the name(the one that apears under 'processes' in Task

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.