マルチウェアハウスを使用して拡張機能を追加した後に再インデックスすることができません「挿入値リストは列リストと一致しません」

magento.stackexchange https://magento.stackexchange.com/questions/10758

質問

私は2つのプラグイン間に矛盾があり、製品価格に再インドすることはできません。プラグインは、X-Multi-WarehouseとSimple Configurable製品です。マルチウェアハウスは、callog_product_index_tier_priceに列stock_idを追加したように見えますが、列の挿入数は一致しません。この変更を反映するためにコードをどこに変更するかはわかりません。 Magento 1.8を実行しています

エラーログ:

## 2013-11-13 13:58:55
## 28663 ## QUERY
SQL: DESCRIBE `catalog_product_index_tier_price`
AFF: 5
TIME: 0.0006

## 2013-11-13 13:58:55
## 28663 ## QUERY
SQL: INSERT INTO `catalog_product_index_tier_price` SELECT `tp`.`entity_id`, `cg`.`customer_group_id`, `cw`.`website_id`, MIN(IF(tp.website_id = 0, ROUND(tp.value * cwd.rate, 4), tp.value)) FROM `catalog_product_entity_tier_price` AS `tp`
 INNER JOIN `customer_group` AS `cg` ON tp.all_groups = 1 OR (tp.all_groups = 0 AND tp.customer_group_id = cg.customer_group_id)
 INNER JOIN `core_website` AS `cw` ON tp.website_id = 0 OR tp.website_id = cw.website_id
 INNER JOIN `catalog_product_index_website` AS `cwd` ON cw.website_id = cwd.website_id WHERE (cw.website_id != 0) GROUP BY `tp`.`entity_id`,
    `cg`.`customer_group_id`,
    `cw`.`website_id` ON DUPLICATE KEY UPDATE `min_price` = VALUES(`min_price`)
TIME: 0.0008

## 2013-11-13 13:58:55
EXCEPTION 
exception 'PDOException' with message 'SQLSTATE[21S01]: Insert value list does not match column list: 1136 Column count doesn't match value count at row 1' in magento/lib/Zend/Db/Statement/Pdo.php:228
Stack trace:
#0 magento/lib/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array)
#1 magento/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#2 magento/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#3 magento/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#4 magento/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT INTO `ca...', Array)
#5 magento/lib/Varien/Db/Adapter/Pdo/Mysql.php(428): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `ca...', Array)
#6 magento/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price.php(455): Varien_Db_Adapter_Pdo_Mysql->query('INSERT INTO `ca...')
#7 magento/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price.php(379): Mage_Catalog_Model_Resource_Product_Indexer_Price->_prepareTierPriceIndex()
#8 magento/app/code/core/Mage/Index/Model/Indexer/Abstract.php(143): Mage_Catalog_Model_Resource_Product_Indexer_Price->reindexAll()
#9 magento/app/code/core/Mage/Index/Model/Process.php(210): Mage_Index_Model_Indexer_Abstract->reindexAll()
#10 magento/app/code/core/Mage/Index/Model/Process.php(258): Mage_Index_Model_Process->reindexAll()
#11 magento/app/code/core/Mage/Index/controllers/Adminhtml/ProcessController.php(127): Mage_Index_Model_Process->reindexEverything()
#12 magento/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Index_Adminhtml_ProcessController->reindexProcessAction()
#13 magento/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('reindexProcess')
#14 magento/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#15 magento/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#16 magento/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#17 magento/index.php(87): Mage::run('', 'store')
#18 {main}

私はまだMagentoにかなり新しいです。これが非常に特異的であれば謝罪。

役に立ちましたか?

解決

実際、それはただのバグです Simple Configurable Products 拡張機能ですが、奇妙なことは、デバッグバックトレースがその拡張機能の少なくとも1つのファイルを表示することです。

私はこれを一度修正しましたが、正確にどのように思い出せません。それはにありました OrganicInternet_SimpleConfigurableProducts_CatalogInventory_Model_Mysql4_Indexer_Stock_Configurable クラス。

正直なところ、可能であれば、拡張機能をすべて一緒に使用することに対してアドバイスします。それは非常に多くの書き直しを行い、他の拡張機能で多くのバグを引き起こします。

ライセンス: CC-BY-SA帰属
所属していません magento.stackexchange
scroll top