Php Magento在更改单个选项后删除文章
当我在商店视图的各个选项中更改某些内容时,Magento 1.6安装正在删除一篇文章 具体程序如下:Php Magento在更改单个选项后删除文章,php,magento,Php,Magento,当我在商店视图的各个选项中更改某些内容时,Magento 1.6安装正在删除一篇文章 具体程序如下: 打开文章 切换到商店视图 切换到单个选项 在选项上取消选中“使用默认值” 保存后,文章就不见了 更准确地说:它删除id为273(状态)的属性。当我手动执行此操作时,文章将备份: INSERT INTO catalog_product_entity_int SET entity_type_id=10, attribute_id=273, store_id=0, entity_id=507, val
INSERT INTO catalog_product_entity_int SET entity_type_id=10, attribute_id=273, store_id=0, entity_id=507, value=1;
(其中实体id是丢失物品的id)
当我恢复文章时,它在再次保存后消失,即使我重新检查了默认选项
有什么想法吗?我不太明白,但是:
if ($result &&
($attribute->isScopeStore() || $attribute->isScopeWebsite()) &&
!$this->_isAttributeValueEmpty($attribute, $value) &&
$value == $origData[$attribute->getAttributeCode()] &&
isset($origData['store_id']) && $origData['store_id'] != $this->getDefaultStoreId()
) {
return false;
}
/* +++ THIS IS NEW +++ */
if ($value === FALSE) {
return FALSE;
}
/* ^^^ THIS IS NEW ^^^ */
。。。修好了。不知怎的,原始if应该返回它,但它没有返回。在日志文件中出现一些有用的信息?它说
ERR(3):注意:未定义的变量:optionTypeId在第230行的/app/code/core/Mage/Catalog/Model/Resource/Product/Option/Value.php中。