I need to set a multi select value for all my products.
I’ve found some informations and try one :
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);
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
Here’s the new var_dump() output
$tmpProd->addAttributeUpdate('moto_compatible', "5632", 1);
‘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.