Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email

Magento Forum

How to modify a multi select attribute value for a product
Jr. Member
Total Posts:  4
Joined:  2012-08-06

Good Afternoon,

I need to set a multi select value for all my products.
I’ve found some informations and try one :

$tmpProd->setData('myAttribute', (string)"5632");

Where 5632 is the Id of one value of the multiSelect Attribute.

It Works BUT, if i go to the product page in backend it’s note the good value wich is selected ; and if i change the value from the backend it doesn’t work now it seem that they are “desyncronised”

Can you help me ?
Thank a lot.

Edit i think, i’have found why but i don’t know how to fix it.
The Multi select attribute has been created after the product so here’s the problem.

To display information I use this code :

$tmpProd Mage::getModel('catalog/product')->load($productId);
    echo (

Before i set in the product page a value for the multiselect attribute i have this output from var_dump(getData()) :
In this output, my attribute ‘moto_compatible’ is missing.

After i set a value for the attribute i have this output
In this output, my attribute ‘moto_compatible’ appear once.

And if I try to use a code like

$tmpProd->addAttributeUpdate('moto_compatible',  "5632"1);
Here’s the new var_dump() output

‘moto_compatible’ appear twice without the same value.

The first one near row 58 is the “effective” (i check using filter)
The second near row 594 is the value which is displayed in the product page (backend )

If i try to change value from backend it don’t work only the “displayed value” change but not the effective ...
And if i change the effective with

the displayed value don’t change

Have you an idea, it’s a headache for me.

Thank again.

Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top