在我们的安装中,当您添加新产品时,catalog_product_option_type_value中的每个其他产品“sku”字段都会更改为此新产品sku和title,导致所有其他产品选项被删除并替换为空白数据和此产品sku,每次我们添加新产品时都会发生这种情况 . 这是唯一受影响的表,并且数据被覆盖 . 在这个例子中,我们制作了新产品'sku“kat123”,正如您所看到的那样,查询说找到所有sku在catalog_product_option_type_value中是空白的并更新到此sku . 我们不断恢复数据库,以便在添加新产品后重新获得所有产品选项 .

在保存产品时,我在查询中发现了这一点,即“查找所有条目,其中sku =空白,将其排除,然后运行流程以使用这些新产品填充它们的所有内容” .

我们正在使用最近的supee补丁运行Magento 1.9.2.2

此查询来自保存新产品时

[12] => Zend_Db_Profiler_Query Object
    (
        [_query:protected] => SELECT `main_table`.* FROM
 `catalog_product_option_type_value` AS `main_table` WHERE (`sku` = '')
        [_queryType:protected] => 32
        [_startedMicrotime:protected] => 1516043123.8483
        [_endedMicrotime:protected] => 1516043123.863
        [_boundParams:protected] => Array
            (
            )

    )


[13] => Zend_Db_Profiler_Query Object
    (
        [_query:protected] => UPDATE `catalog_product_option_type_value` 
SET `option_id` = ?, `sku` = ?, `sort_order` = ?, `customoptions_qty` = ?, 
`default` = ?, `in_group_id` = ?, `dependent_ids` = ?, `weight` = ?, `cost` = ?, 
`descr` = ?, `extra` = ?, `customoptions_min_qty` = ?, `customoptions_max_qty` = ?, 
`upc` = ? WHERE (option_type_id='30')
        [_queryType:protected] => 8
        [_startedMicrotime:protected] => 1516043124.0438
        [_endedMicrotime:protected] => 1516043124.0459
        [_boundParams:protected] => Array
            (
                [1] => 5
                [2] => kat123
                [3] => 0
                [4] => 
                [5] => 0
                [6] => 1
                [7] => 
                [8] => 0
                [9] => 0
                [10] => 
                [11] => 
                [12] => 
                [13] => 
                [14] => 
            )

    )

(continues through every product)