Logo: deam.org

Magento-Attributes: don’t use varchar with select by Klaus M. Brantl

This will be an ongoing post because I still don’t know what went wrong with my old installation that caused this error:

There are at least two other people with the same problem (Magento forum), but no solution so far.
So I did a fresh install with the latest stable release of Magento: 1.6.2.0. I thought that my upgrades from 1.4 might have caused the trouble – or my catalog-importer might be wrong (the project I”m working on is a complex one with auto-creating attributes while importing products).

I’ve found another thing that did not change the problem with the above error-message:

Don’t use ‘type’ => ‘varchar’ if you want to use ‘input’ => ‘select’ for your newly created attributes (via core_setup).
If you do and if someone makes a change in the admin-frontend, then the ‘varchar’ will be changed into ‘int’ within the eav_attribute-table and you are lost. Because Magento will not move the data from catalog_product_entity_varchar to catalog_product_entity_int. The funny thing: you will still see your options within the admin – even on the product itself, but you won’t get the values (like getAttributeText) in you frontend-templates.
So just set it to ‘int’ on your automated import and you’ll be fine.

The newly installed Magento works fine now. I can add attributes in the admin as much as I like.
My old version still does not work and I need to search a little more to find the difference that kills it all :-/

Tags:

This entry was posted on Monday, January 23rd, 2012 at 17:13 and is filed under PHP/ PHP-Frameworks/ CakePHP. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply

Blog :: deam.org is proudly powered by WordPress
Entries (RSS) and Comments (RSS).