0

we have two attributes for color. A multiple select color (for all used colors on a shirt) and a select color main_color for Google shopping.

Now we have some shopping extensions that default to the color attribute. And break because this is a multiple select instead of single value. Now we could just change that. The problem is that these attributes have been populated for all our products.

Question: is there an easy way to switch the attribute code for these two attributes - whilst keeping the values linked?

1 Answer 1

0

The only place where the attribute code is kept is the eav_attribute table (I think).
So you can switch the attribute_code value for the 2 attributes.
Clear the cache and rebuild your indexes.

But back-up your db in case I'm wrong.

Of course you could get strange results if you have code sections that call specifically $_product->getColor() or getMainColor().

1
  • will try (and test via backup). thx
    – snh_nl
    Commented Nov 28, 2014 at 12:26

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.