Magento类别平台

时间:2012-12-03 18:18:44

标签: php magento

我已经在类别实体中添加了很多自定义属性,现在当我尝试重新索引时我得到了错误

SQLSTATE[42000]: Syntax error or access violation: 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. You have to change some columns to TEXT or BLOBs

我知道这意味着平面桌太大了,确实有很多列。我不需要该表中的自定义属性,所以我可以删除它们,但我怎么能这样做?我发现,如果我设置可过滤的并且可以比较为假,那么它们不应该在平面表中。任何帮助将不胜感激

public function getDefaultEntities()
{
    return array(
        'catalog_category' => array(
            'entity_model'      => 'catalog/category',
            'attribute_model'   => 'catalog/resource_eav_attribute',
            'additional_attribute_table' => 'catalog/eav_attribute',
            'entity_attribute_collection' => 'catalog/category_attribute_collection',
            'table'             => 'catalog/category',
            'attributes'        => array(
                'cat_type' => array(
                    'group'             => 'General',
                    'label'             => 'Category Type',
                    'type'              => 'int',
                    'input'             => 'select',
                    'default'           => '0',
                    'class'             => '',
                    'backend'           => '',
                    'frontend'          => '',
                    'source'            => 'eav/entity_attribute_source_cattype',
                    'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
                    'visible'           => true,
                    'required'          => false,
                    'user_defined'      => false,
                    'searchable'        => false,
                    'filterable'        => false,
                    'comparable'        => false,
                    'visible_on_front'  => false,
                    'visible_in_advanced_search' => false,
                    'unique'            => false
                ),

编辑:

我已经删除了属性并且它工作然后我再次运行安装脚本,所有这些都具有可过滤和可比较的设置为false,如下面我发布的示例,它再次向我显示错误,我缺少什么?

编辑:

我检查了平面类别表,我看到所有属性都添加了它们。 那么可过滤和可比较的产品属性是否适用? 我认为它们对于类别产品将是相同的值。

无论如何要从该表中排除我的属性? 我可以排除他们修改创建表的文件,显然在我的本地文件夹中,但我想知道哪种方法可以做到这一点?

1 个答案:

答案 0 :(得分:0)

检查名为used_in_product_listing的eav_attribute表和列,将其设置为0或false,不应将其添加到类别产品平台中。

相关问题