Вопрос

Inside a mysql4 upgrade script for my module, I have the following:

$installer = $this;
$installer->startSetup();

// Code that builds the var $optionList is here

$collection = array(
    'label'             => 'Collection:',
    'input'             => 'multiselect',
    'default'           => '0',
    'class'             => '',
    'backend'           => '',
    'frontend'          => '',
    'source'            => '',
    'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
    'visible'           => true,
    'required'          => false,
    'user_defined'      => true,
    'searchable'        => true,
    'filterable'        => true,
    'comparable'        => true,
    'visible_on_front'  => true,
    'visible_in_advanced_search' => true,
    'unique'            => false,
    'option'            => $optionList
);

$installer->addAttribute('catalog_product', 'collection', $collection);

$installer->endSetup();

All of the => true settings that I have here are showing up as No on the final attribute edit screen in the Admin. (Screenshot: http://goo.gl/aSQ3wk)

Here is the <resources> section of my config.xml file:

<resources>
    <company_modulename_setup>
        <setup>
            <module>Company_Modulename</module>
            <class>Company_Modulename_Model_Resource_Eav_Mysql4_Setup</class>
        </setup>

        <connection>
            <use>core_setup</use>
        </connection>
    </company_modulename_setup>

    <company_modulename_write>
        <connection>
            <use>core_write</use>
        </connection>
    </company_modulename_write>

    <company_modulename_read>
        <connection>
            <use>core_read</use>
        </connection>
    </company_modulename_read>
</resources>

I'm not sure why all of these settings aren't taking. Any ideas?

Нет правильного решения

Лицензировано под: CC-BY-SA с атрибуция
Не связан с magento.stackexchange
scroll top