Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/274.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ssl/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Magento升级脚本不支持';t升级_Php_Mysql_Magento_Attributes - Fatal编程技术网

Php Magento升级脚本不支持';t升级

Php Magento升级脚本不支持';t升级,php,mysql,magento,attributes,Php,Mysql,Magento,Attributes,我一直在尝试为自定义属性制作升级脚本。但是,升级脚本似乎不起作用。它不会更新站点或mysql数据库 它所需要做的就是将组从“通用”切换到“Prijzen” 每次我尝试升级模块时,版本号不会改变,组也不会改变。似乎找不到我要走的错误的转弯 MySQL数据库核心资源 topperquotation_setup | 0.1.0 | 0.1.0 模块config.xml: <config> <modules> <Topper_Quotat

我一直在尝试为自定义属性制作升级脚本。但是,升级脚本似乎不起作用。它不会更新站点或mysql数据库

它所需要做的就是将组从“通用”切换到“Prijzen”

每次我尝试升级模块时,版本号不会改变,组也不会改变。似乎找不到我要走的错误的转弯

MySQL数据库核心资源

topperquotation_setup  |  0.1.0  |  0.1.0
模块
config.xml

<config>
    <modules>

        <Topper_Quotation>
            <version>1.0.0</version>
        </Topper_Quotation>

    </modules>

    <global>

        <resources>
            <topperquotation_setup>
                <setup>
                    <module>Topper_Quotation</module>
                    <class>Mage_Catalog_Model_Resource_Setup</class>
                </setup>
                <connection>
                    <use>core_setup</use>
                </connection>
            </topperquotation_setup>
        </resources>

        <template>
            <email>
                <topp...........
当前
升级-0.1.0-1.0.0.php

<?php
/** @var Mage_Catalog_Model_Resource_Setup $installer */
$installer = $this;
$installer->startSetup();

$installer->addAttribute('catalog_product', 'is_quotable', array(
    'group'             => 'General',
    'type'              => 'int',
    'backend'           => '',
    'frontend'          => '',
    'label'             => 'Offerteaanvraag',
    'input'             => 'select',
    'class'             => '',
    'source'            => 'eav/entity_attribute_source_boolean',
    'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
    'visible'           => true,
    'required'          => false,
    'user_defined'      => false,
    'default'           => '0',
    'searchable'        => false,
    'filterable'        => false,
    'comparable'        => false,
    'visible_on_front'  => false,
    'unique'            => false,
    'apply_to'          => 'simple,virtual,bundle',
    'is_configurable'   => false,
));

$installer->endSetup();
<?php
/** @var Mage_Catalog_Model_Resource_Setup $installer */
$installer = $this;
$installer->startSetup();

$installer->updateAttribute('catalog_product', 'is_quotable', 'group', 'Prijzen');

$installer->endSetup();
创建了注释作为答案,因此可以关闭该注释


确保已关闭缓存并清除
var/cache
。Magento在缓存中保留所有配置
.xml
文件的副本(实际上是合并在一起的所有配置文件)-因此需要在识别版本号更改之前清除该副本

先简单一点-你是否关闭了缓存,并清除了
var/cache
?哦,我觉得自己太傻了哈哈!我清理了很多次缓存,就在我没想到缓存的时候,这种情况发生了。谢谢提醒;)